copy/paste text returns additional information

Discussion in 'Programming' started by dethfire, Apr 8, 2013.

  1. #1
    I coped the text title of this article and it includes a link of the page when I paste it somehow. How does it work? Copy the title and then paste it somewhere. You'll see what I mean.

    http://www.foxnews.com/tech/2013/03/29/digital-currency-bitcoin-surpasses-20-national-currencies-in-value/
     
    dethfire, Apr 8, 2013 IP
  2. dafuqjoe

    dafuqjoe Member

    Messages:
    34
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #2
    I think it works with JS. With JS you can catch the "copy event".
     
    dafuqjoe, Apr 8, 2013 IP
  3. DavidHarvey

    DavidHarvey Greenhorn

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #3
    Unable to catch your question, what actually are you asking about ??Can you elaborate a bit?
     
    DavidHarvey, Apr 11, 2013 IP
  4. dethfire

    dethfire Well-Known Member

    Messages:
    230
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    118
    #4
    Simply if I copy some text on that page and then paste it in note pad there is extra print that I did not copy. It adds their website. So with javascript how do you add "from xxxx" whenever someone copies text from your page?
     
    dethfire, Apr 11, 2013 IP
  5. dafuqjoe

    dafuqjoe Member

    Messages:
    34
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #5
    Just google it, there are many hits:
    http://stackoverflow.com/questions/10827256/how-to-detect-copy-and-paste-in-javascript
    http://stackoverflow.com/questions/2903991/how-to-detect-ctrlv-ctrlc-using-javascript
    http://help.dottoro.com/ljwexqxl.php

    I did it once with jQuery. Just google a little. Isn't that hard.
     
    dafuqjoe, Apr 11, 2013 IP
  6. dethfire

    dethfire Well-Known Member

    Messages:
    230
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    118
    #6
    Thanks, but I don't just need to know how to detect though. I need to append content to whatever they are copying.
     
    dethfire, Apr 11, 2013 IP
  7. dafuqjoe

    dafuqjoe Member

    Messages:
    34
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #7
    To append something watch this link:
    http://techstream.org/Web-Development/Javascript/add_copyright
     
    dafuqjoe, Apr 11, 2013 IP