GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Anti-copy-paste script inside (https://gfy.com/showthread.php?t=961720)

SmokeyTheBear 04-03-2010 09:33 AM

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

alias 04-03-2010 09:40 AM

Cool, thanks.

TheDA 04-03-2010 09:53 AM

I've just copied and pasted in Firefox OK

Edit: And IE. Full text pasted as per the original and no 'contributed by' link added either.

CaptainHowdy 04-03-2010 01:56 PM

This one needs a lil' bump...

fatfoo 04-03-2010 02:01 PM

Can "Viewing Source" be disabled, too?

Inter-Sex 04-03-2010 02:20 PM

Quote:

Originally Posted by fatfoo (Post 17003835)
Can "Viewing Source" be disabled, too?

Sure "ALT + F4" does the trick. :winkwink:

eMonk 04-03-2010 03:03 PM

It doesn't work for Google Chrome.. :winkwink:


All times are GMT -7. The time now is 05:36 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc