User:Blaxthos/hidehugglecontribs.js

// borrowed from User:X!

function hideawbcontrib { var i,li,a; li=document.getElementById("bodyContent"); li=li.getElementsByTagName("li"); i=-1; a=new Array; while(++i<li.length) {   var s,t; t=li[i].innerHTML.match(/"\/wiki\/([^"]*)"/)[1];   if(li[i].innerHTML.match(/\(\<a href=\"\/wiki\/Wikipedia:AWB\" class=\"mw\-redirect\"/))      s="none";    else      s="";    if(a[t]!=undefined) s=a[t]; else a[t]=s;    if(s!="") li[i].style.display=(li[i].style.display=="none"?"list-item":"none");  } } $(function  {  if((location.href.indexOf("Special:Contributions")!=-1||      location.href.indexOf("Special%3AContributions")!=-1)     &&location.href.indexOf("&ais523")==-1&&location.href.indexOf("?ais523")==-1)    mw.util.addPortletLink('p-cactions', 'javascript:hideawbcontrib', 'show/hide awb edits', 'ca-hideawb',                   "Show/hide pages made using AWB", ''); }); //  //