Anti-copy-paste script inside

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SmokeyTheBear
    ►SouthOfHeaven
    • Jun 2004
    • 28609

    #1

    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
  • alias
    aliasx
    • Apr 2001
    • 19010

    #2
    Cool, thanks.
    https://porncorporation.com

    Comment

    • TheDA
      Confirmed User
      • May 2006
      • 4665

      #3
      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.
      Last edited by TheDA; 04-03-2010, 08:55 AM.
      Sharleen Spiteri - 1989 - In The Ass

      Comment

      • CaptainHowdy
        Too lazy to set a custom title
        • Dec 2004
        • 94731

        #4
        This one needs a lil' bump...

        Comment

        • fatfoo
          ICQ:649699063
          • Mar 2003
          • 27763

          #5
          Can "Viewing Source" be disabled, too?
          Send me an email: [email protected]

          Comment

          • Inter-Sex
            Confirmed User
            • Nov 2005
            • 2231

            #6
            Originally posted by fatfoo
            Can "Viewing Source" be disabled, too?
            Sure "ALT + F4" does the trick.

            Comment

            • eMonk
              Confirmed User
              • Aug 2003
              • 2310

              #7
              It doesn't work for Google Chrome..

              Comment

              Working...