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.
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.
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.
- Download the extension from the GitHub website and extract it to a location of your choosing.
- Load chrome://extensions/ in the address bar of the Chrome browser.
- Check the developer mode box at the top of the page that opens.
- 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.
Both Chrome extensions enable you to copy text without interference from the site the text is copied on.
Ghacks needs you. You can find out how to support us here or support the site directly by becoming a Patreon. Thank you for being a Ghacks reader.
The post Prevent copy text manipulation in Chrome appeared first on gHacks Technology News.