Archive for the ‘bookmarklet’ tag
nofollow Bookmarklet
Here is a smallish bookmarklet that highlights all links that are marked with the nofollow attribute. Just drag and drop it to your bookmarks bar.
In its current version the bookmarklet is very very simple: it just highlights nofollow-links and reports back the total number. However it only works on frameless documents.
Here’s the code in a readable <code>-block:
-
javascript:(function(){
-
for (var i = 0, a = document.getElementsByTagName('a'), b = a.length, c = b; i < b; i++) {
-
a[i].rel.match(/nofollow/i) ? a[i].style.backgroundColor = '#ff0066' : c–;
-
}
-
alert(c);
-
})();
That’s the shortest I could get. Have fun :).
P.S. You can test-drive it right away on this page: the about-link in the footer is a nofollow-link.
P.P.S. It’s the browser that turns a double minus into a single long dash.

