Google Chrome Extension: nofollow marker

Posted September 17 by Dan Cryer

I was just playing about with Google Chrome’s extension system, and threw together a very simple one that highlights all nofollow links in pink, as I’d seen a few people using something similar in Firefox. It doesn’t do anything complex, the code is as follows:

var elements = document.getElementsByTagName('a');
var length = elements.length - 1;

for(var i = length; i >= 0; i--)
{
if(elements[i].getAttribute('rel') && elements[i].getAttribute('rel').indexOf('nofollow') >= 0)
{
elements[i].className += ' nofollow_has_no_follow';
}
}

Google Chrome Dev Channel users can Download and Install it now.

7 Responses to “Google Chrome Extension: nofollow marker”

  1. [...] a quick follow up to my nofollow marker post, I’ve put up a new version of the extension. It does exactly the same job as the old [...]

  2. [...] NoFollow Link Checker Extension – Checks and highlights nofollow links on the current webpage. [...]

  3. [...] iMacros Extension – Record and Play macros in Google Chrome to quickly perform repetitive tasks. NoFollow Link Checker Extension – Checks and highlights nofollow links on the current [...]

  4. [...] NoFollow Link Checker Extension – Checks and highlights nofollow links on the current webpage. [...]

  5. nmurden says:

    just testing nofollow on this using checker.

  6. nmurden says:

    yep…works fine

  7. Nico697 says:

    Really cool this add!!

Leave a Reply