View Single Post
Old 04-03-2010, 09:33 AM  
SmokeyTheBear
►SouthOfHeaven
 
SmokeyTheBear's Avatar
 
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
:stoned Anti-copy-paste script inside

For most of you this is likely useless but someone might find it handy.

Basically what this script does is alters what a user copies from your site.

So lets say you have a news site or recipe site for example , and surfer comes and copies your text to repost on his blog etc, this script will alter what the user copies and add a linkback to your site in html code, or add whatever you want as a footnote.

p.s. only works for i.e. users, other browsers copy is disabled

Code:
<SCRIPT type="text/javascript"> 
var bResult;
function fC(){
event.returnValue = false;
var cstr=document.selection.createRange().text;
bResult = window.clipboardData.setData("Text",cstr + " Courtesy of <a href='"+document.location.href+"'>"+document.title+"</a>");
	
}
</script>
<div oncopy="fC();">
this text is now protected, this text is now protected
</div>
example
__________________
hatisblack at yahoo.com
SmokeyTheBear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote