Disable all hyperlinks in any website

chromium, firefox, javascript, web

Solution

To disable all links use

$('a').bind("click.myDisable", function() { 
   return false; 
});

and to enable it use

$('a').unbind("click.myDisable");

Problem

Is there a way to disable all hyperlinks in any website using javascript? The reason I want to do this is for text-selection. Many websites are putting whole blocks of text inside tags, making it difficult to select text. I use chromium and firefox on kubuntu 13.10.

Original source