The first step to reclaiming your browser is taking control of links.
Make every URL clickable.
Have you ever visited a page that displayed a naked URL that you couldn’t click? That is, the URL is displayed as plain text on the page, and you need to manually copy the text and paste it into a new browser window to follow the link. I run into this problem all the time while reading weblogs, because many weblog publishing systems allow readers to submit comments (including URLs) but just display the comment verbatim without checking whether the comment includes a naked URL. This hack turns all such URLs into clickable links.
This user script runs on all pages. To ensure that it does not affect URLs that are already linked, it uses an XPath query that includes
not(ancestor::a). To ensure that it does affect URLs in uppercase, the XPath query also includes "
contains(translate(., 'HTTP', 'http'), 'http')]".
Once we find a text node that definitely contains an unlinked URL, there could be more than one URL within it, so we need to convert ...