Posted By

cartercole on 08/07/10


check link test seo attribution

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Enforce link attribution requirements for SEO

 / Published in: JavaScript


uses JavaScript to check DOM for proper clean linkback to widget source

  1. (function(){var a=new RegExp("","i"),b=document.getElementsByTagName("meta"),c=b.length,d=false,e=document.links,f=e.length;for(i=0;i<f;i++)if(a.test(e[i].href))/nofollow/i.test(e[i].rel)||(d=true);for(i=0;i<c;i++)if(b[i].name.toLowerCase()=="robots")if(/nofollow/i.test(b[i].content))d=false;if(!(d)){
  2."");//run if clean link isnt found
  3. }})()

Report this snippet  

You need to login to post a comment.