User:X!/hidehugglecontribs.js
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
function hidehugcontrib()
{
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:HG\" class=\"mw\-redirect\" title=\"Wikipedia:HG\"\>HG\<\/a\>/))
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");
}
}
addOnloadHook(function () {
if((location.href.indexOf("Special:Contributions")!=-1||
location.href.indexOf("Special%3AContributions")!=-1)
&&location.href.indexOf("&ais523")==-1&&location.href.indexOf("?ais523")==-1)
addPortletLink('p-cactions', 'javascript:hidehugcontrib()', 'show/hide huggle edits', 'ca-hidehug',
"Show/hide pages made using Huggle", '');
});
//</nowiki></pre>
//[[Category:Wikipedia scripts]]