Prevent copy text manipulation in Chrome

Martin Brinkmann
May 24, 2016
Google Chrome
|
5

Websites and services can use JavaScript, and other technologies such as Flash if available, to manipulate text that is copied to the clipboard by users.

Some sites use the feature to add a copyright note to the copied text while others may prevent copy operations to the clipboard entirely by erasing the copied contents before they reach the clipboard.

A simple example page -- click here -- demonstrates the process. Select some of the text on the page and copy it to the Clipboard afterwards, for instance by using Ctrl-C.

If you paste the content of the Clipboard afterwards, you will notice that something else entirely has been copied to the Clipboard.

clipboard text manipulation

The page intercepts the copy to Clipboard event, erases what has been copied by the user, and replaces it with text of its own.

The process is called clipboard injection or pastejacking, and it can be very annoying and may even have privacy implications.

Firefox users can disable these clipboard events in the browser, but doing so prevents some operations on sites that make use of these features for legitimate reasons. You may notice that you cannot paste content into forms anymore, that sites may break, or that automatic form filling is not working anymore.

Firefox users have access to an array of browser add-ons that disable Clipboard manipulating as well: RightToClick for example.

Google Chrome users cannot just flip a switch in the web browser to block sites from reading and manipulating copied text, but extensions are available that add the feature to Google Chrome.

Probably the most convenient option for Chrome users is RightToCopy. It prevents sites from manipulating copied text before it is copied to the Clipboard, and does away with some other annoyances such as disabled right-click menus.

Downside is that it requires read and write access of data on the websites you visit in Chrome. While the permission request is understandable, since it needs to work on sites you visit to prevent those sites from being annoying.

Real Copy is an alternative. The extension adds an icon to the Chrome toolbar that you can click on after selecting text to make sure the selected text is copied and not manipulated.

chrome real copy

The extension is not available o the Chrome Store but only on GitHub. This means that you need to load it as an unpacked extension currently.

  1. Download the extension from the GitHub website and extract it to a location of your choosing.
  2. Load chrome://extensions/ in the address bar of the Chrome browser.
  3. Check the developer mode box at the top of the page that opens.
  4. Select load unpacked extension, and pick the Real Copy root folder on the device.

The extension is now installed and ready for use.

Google Chrome may prompt you at times that you have installed a developer extension but that is the only downside here.

An even simpler solution, one that does not work on all sites, is to disable JavaScript completely on the site you are on to prevent it from hijacking the clipboard operation.

Both Chrome extensions enable you to copy text without interference from the site the text is copied on.

Summary
Prevent copy text manipulation in Chrome
Article Name
Prevent copy text manipulation in Chrome
Description
Find out how to prevent websites and services from manipulating text that you want to copy to the Clipboard of the computer when using Google Chrome.
Author
Publisher
Ghacks Technology News
Logo
Advertisement

Previous Post: «
Next Post: «

Comments

  1. Neil D Great said on July 5, 2017 at 8:29 pm
    Reply

    Kudos, it works, tho the formatting is gone.

  2. CHEF-KOCH said on May 24, 2016 at 8:26 pm
    Reply
  3. Dave said on May 24, 2016 at 6:11 pm
    Reply

    Clipboard events shouldn’t exist. Got a scammy ad running at the bottom of a website while you’re doing your finances in another program, with the browser minimised? Don’t copy anything in case the ad grabs it. Stupid feature.

    Of course you can turn this rubbish off in Firefox, and interestingly it’s off in IE by default.

    1. Croatoan said on May 24, 2016 at 9:53 pm
      Reply

      Even better. Without addons. Select and drag text to url bar, then copy text :)

      Someone at this site recommended this trick to me :)

      1. user63452 said on April 11, 2019 at 2:34 am
        Reply

        drag&drop interestingly enough is a clipboard interaction, whether in a browser or moving files with windows, I’d recommend ScriptSafe for your browsing

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.