با قرار دادن این کد در قالب خود ، هنگام کپی کردن متنی از وب شما توسط سارقین ، آدرس شما نیز به عنوان منبع کپی می شود
و این جوری حالشان مقداری گرفته میشود.
<script type="text/javascript">function addLink() { var
body_element = document.getElementsByTagName('body')[0]; var
selection; selection = window.getSelection(); var pagelink = "<br
/><br /> منبع نوشته: <a
href='"+document.location.href+"'>"+document.location.href+"</a><br
/>کپی کردن بدون ذکر منبع باعث کاهش رتبه وب شما در گوگل
میشود"; 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>