Google Chrome No-Follow Tool

Posted Friday, March 6, 2009 2:41:01 PM
Many people that like Google Chrome still complain that it doesn't have a tool that can highlight links on a page that are no-followed; if you are one of those people, then this "tool" is for you.

I say "tool", because it really is just a bookmark that I've created, but rather than the bookmark linking to a traditional "http://" URL, it instead links to a "javascript:" URL which runs on the current page.

To use this tool, I recommend having your bookmarks in Google Chrome set to "Always Display". If you don't currently have a Bookmark Toolbar under your main toolbar, press CTRL+B. You should now see a row for bookmarks in your browser.

Next, simple click on the image below and drag it into your bookmark area.

Highlight No-Follows

For those technically savvy people who want to see the script behind the magic, here it is:
	var l = document.getElementsByTagName('a');

	for(n=0;n<l.length;n++)	{

		var tl = l[n].rel.toLowerCase();

		if(tl.indexOf('nofollow')>-1)	{
			void(l[n].style.backgroundColor='#FF0000');
		}
	}

Comments: 2 (View | Post)
Categories: Technical, Tools

Post A Comment

View Comments

There are 2 comments on this article
Sean Weigold Ferguson (15 years ago)
Personally, I prefer adding a line-through to nofollowed links. It just seems more intuitive to me. You can easily modify this code to do this by replacing:
style.backgroundColor='#FF0000'
with
style.textDecoration='line-through')
Jeremy (15 years ago)
Hey Adam. Thanks for the link. Nice to find this for chrome.