Hello Blogger's how are you , I hope your are doing good and great. I am Sadab Ali and welcom again to Tech Aadi.
Copying content from your blog is very frustrating thing to be happened with you. And what after that you will send hi DMCA takedown or something.
Yes our topic is to prevent our blog articles from copy writing.
But let me tell you one thing you can try this JavaScript and if anyone tried to copy your post then the souce code will automatically be copied from your blog.
So let's start the process of adding JavaScript in your blog for preventing it from Copying.
Before doing any change in your blog and template please backup your blog template for any kind of errror and easy restoration process.
Adding JavaScript for Preventing Blog from Copying
You have to only Add JavaScript in your blog so please follow the below given step carefully.
Adding JavaScript
- Go to your Blogger dashboard.
- Click on themes section.
- Then click on Edit HTML.
- Now search for the
</body>
tag. - Copy the below given JavaScript and paste it just above the
</body>
tag.
<script type="text/javascript"> function addLink(){ var body_element = document.getElementsByTagName('body')[0]; var selection; selection = window.getSelection(); var pagelink = "<br/><br/>Article Source : <a href='"+document.location.href+"'>"+document.location.href+"</a>"; var copytext = selection + pagelink; var newdiv = document.createElement('div'); newdiv.style.position='absolute'; newdiv.style.left='-99999px'; body_element.appendChild(newdiv); newdiv.innerHTML = copytext; selection.selectAllChildren(newdiv); window.setTimeout(function() { body_element.removeChild(newdiv); },0); } document.oncopy = addLink; </script>
Now click on Save Theme.
That's all. Now copy any content from your blog and paste it somewhere you will see the results or you can view the demo.
You can also copy any word from this article and paste it anywhere you can see the source code URL of my blog automatically pasted below there.
After completing above steps I hope you have successfully installed the script for preventing your blog from Copying. If you get any error kindly contact us.
Conclusion
So today we have discussed about How to Prevent your Blog Articles from Copying with Simple JavaScript codes. I hope you liked our blog and please do follow our blog for more updates. If you have a query please comment below.