Thursday, January 12, 2017

How to highlight and copy text on sites that block it

How to highlight and copy text on sites that block it



Every now and then I come across sites on the Internet that prevent you from copying some or all of the text displayed to the clipboard, or even selecting it in first place using the mouse or keyboard.
I noticed this on a banks site recently for example where I was not allowed to copy the bank account number to the clipboard.
This guide looks at methods to overcome the limitation put in place by websites on the Internet. But first, why do sites implement these restrictions in first place?
While reasons are provided by companies and individuals who implement the functionality on their web properties, the most likely reason is some form of copy protection.
Method 1: Turn off JavaScript
javascript
Most websites use JavaScript to block mouse functionality. If you turn off JavaScript on the site temporarily or even permanently, you will be able to copy text displayed on it using the mouse.
Some websites rely on JavaScript on the other hand which means that you may run into issues doing so. Some may even refuse to display at all when JavaScript is turned off.
  • Firefox users can press F12, there on the preferences icon to disable JavaScript in the menu that opens.
  • Chrome users can disable JavaScript in the Content settings: chrome://settings/content
  • Internet Explorer users can turn off JavaScript in Internet Option > Security > Zone > Custom Level > Active Scripting
  • Opera users can disable JavaScript under Websites in the Opera settings: opera://settings/
Extensions like NoScript can be useful in this regard as they block the execution of scripts as well.
Method 2: The source
source
Another option that you have is to display the source code of the website you are on. Since it is displayed in a plain text editor it is possible to copy anything from it without restriction.
Simply press Ctrl-u while you are on the site to display its source code. This works in most browsers including Firefox, Chrome and Internet Explorer.
It is still necessary to find the text or content that you are looking for in the source. Use Ctrl-f to jump directly to it.
There you may also find links to images and other contents that you could not save or copy.
Method 3: Extensions and scripts
The third and final option is most suitable if you encounter sites regularly that prohibit right-click use or text copying when you are on them, and if the methods outlined above dont work or are not really suitable.
RightToClick for Firefox disables JavaScript annoyances such as forbidding right-clicks or text selection on sites.
RightToCopy for Chrome offers similar features.
You find numerous extensions for these two browsers that remove annoyances on websites.
Summary
Article Name
How to highlight and copy text on sites that block it
Description
Some sites block text selection and copying using JavaScript. This guide looks at three methods that allow you to copy text on these sites anyway.
Author


Available link for download