Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8104089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:44:13+00:00 2026-06-05T23:44:13+00:00

While working on something non-development related, I noticed something interested while on answers.com .

  • 0

While working on something non-development related, I noticed something interested while on answers.com. I copied and pasted some text from an answer, and noticed that along with my answer I got some text that I didn’t copy. After looking into it some more, it seems that if you copy 8 or more words from anywhere on the site, it adds some text when you paste it. For instance, if I go to a page on the site and copy 8 words or more, and then paste that somewhere, you will get something like:

Insanity is doing the same thing over and over again but expecting
different results.

Read more:
http://wiki.answers.com/Q/Who_first_said_the_definition_of_insanity_is_to_do_the_same_thing_over_and_over_and_expect_different_results#ixzz1xqDl0yUW

My questions is, does anyone know how that is done?! I’ve looked into the code a bit, but haven’t found anything giving me any clues 🙂 Thanks!

P.S. Yes, that page was the one I was viewing when I noticed this 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T23:44:14+00:00Added an answer on June 5, 2026 at 11:44 pm
    function addText() {
        var body_element = document.body;
        var selection = window.getSelection();
        var extraText = "<br /><br />some extra info here";
        var copytext = selection + extraText;
        var newdiv = document.createElement('div');
        newdiv.setAttribute('style','position:absolute;left:-99999px;')
        newdiv.innerHTML = copytext;
        body_element.appendChild(newdiv);
        selection.selectAllChildren(newdiv);
        window.setTimeout(function() {
            body_element.removeChild(newdiv);
        },0);
    }
    document.oncopy = addText;
    

    Credits: How to add extra info to copied web text

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While working my way through the Android tutorials, I came across something I don't
There's something I recurently struggle with while working on C++ code. Let's say I've
I'm reading a book development of enterprise applications while working on MVC 3 project.
While working with ssh I sometimes write to long string/commands eg. command -param 3
While working on my final project for my AS/400 Course, I encountered this problem
While working with Database records ,displaying them on HTML and storing their ID into
While working a project tonight, I ended up using one .js resource file for
While working with Java, I find it hard to position my main window in
While working with git-svn, and a 'typical' svn repo /trunk, /branches/..., /tags/... How do
While working on an Xcode project i keep getting the spinning wheel while switching

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.