User:Markhurd/hidetopcontrib.js: Difference between revisions

Content deleted Content added
Markhurd (talk | contribs)
m fix simple WP syntax highlighter
Markhurd (talk | contribs)
Cater for new <span class="mw-uctop">; Add userHideAllSubsequent user setting.
Line 3:
// 090325 MEH Fixed where it is not hiding all (top)s, starting with redirects
// and continuing after any regex mismatch.
// 090615 MEH Cater for new <span class="mw-uctop">
// Add userHideAllSubsequent user setting.
 
// This script hides lines according to who has the top contribution for a page.
 
userHideAllSubsequent=(userHideAllSubsequent==undefined)?false:userHideAllSubsequent;
 
//<pre><nowiki>
Line 32 ⟶ 36:
}
 
if(li[i].getElementsByTagName("strong").length>0||li[i].innerHTML.match(/\<span +class\="mw\-uctop"\>/)!=undefined)
s="none";
else
Line 38 ⟶ 42:
 
if(a[t]!=undefined)
s=userHideAllSubsequent?"none":a[t];
else
a[t]=s;