How To Automatically Add Source Link


Hello Friends, if your content is copied and the person paste it in his website, then your link will be added to it, what can be a good thing. So today I will teach you how to do this so that if someone copies the post of your site then you will still get backlink. Today we are discussing How To Automatically Add Source Link .

On the Internet it is very easy to copy text from one site and paste it to another site. Technically, if a blog visitor copies text from a particular site he should provide a link to the source of the site he copied the text. But there are also people who ignore this important thing.


To avoid this, here I will give a code that automatically if someone copies the text part of our article it will automatically bring up the source link from the text that he copied.

Sidebar floating fb like box widget for blogspot

Although this method in my opinion is still not effective because the source link can be removed easily and these tips are old ways that can still be used 😊, but at least it will give a little warning for those who copy the text of our blog articles. Next, How To Automatically Add Source Links.

how to automatically add source link


How To Add Automatically Source Link


This code works in several favorite browsers (including Microsoft Edge). Open the Blogger page> Click Theme> Click the Edit HTML button and add the code below> Then click Save theme.


  • Version 1 :


<script type='text/javascript'>
//<![CDATA[
// Copy Text
function nocopas(){var e=window.getSelection();pagelink=" Read more : "+document.location.href,copytext=e+pagelink,newdiv=document.createElement("div"),newdiv.style.position="absolute",newdiv.style.left="-99999px",document.body.appendChild(newdiv),newdiv.innerHTML=copytext,e.selectAllChildren(newdiv),window.setTimeout(function(){document.body.removeChild(newdiv)},100)}document.addEventListener("copy",nocopas);
//]]>
</script>




  • You can edit part of the code ( READ MORE ) 



  • Version 2 :


<script type='text/javascript'>
//<![CDATA[
!function(e,t){var n="getSelection",o="removeAllRanges",i="addRange",l="parentNode",a="firstChild",d="appendChild",r="removeChild",s="test",c="innerHTML";if(e[n]){var p,g,f,h,u,y;t.addEventListener("copy",function(C){for(g=C.target;3===g.nodeType;)g=g[l];if(h=t.createElement("div"),(p=e[n]())&&p.rangeCount&&(p=p.getRangeAt(0))&&(f=p.cloneRange(),p=p.cloneContents())){for(;u=p[a];)h[d](u);if(!/^(pre|code)$/i[s](g.nodeName||"")&&!/(^|\s)no-attribution(\s|$)/i[s](g.className||"")){var v=e.location.href;h[c]+="<br><br>&copy; "+t.title+'<br>Source: <a href="'+v+'">'+v+"</a>"}y=t.createRange(),t.body[d](h),y.selectNodeContents(h),p=e[n](),p[o](),p[i](y),setTimeout(function(){h[l][r](h),p[o](),p[i](f)})}},!1)}}(window,document);
//]]>
</script>


For tips this time I am enough, thank you for visiting. If you like this article, please share it with social media. So that everyone can get help.




Gourab Das is a young and challanging web, graphic and logo designer.Gourab Design is Personal Blogger Templates site is a provider High Quality Premium Blogger Templates and Also Technology tips and latest tech news.

Comments