User:Markhurd/hidetopcontrib.js: Difference between revisions

Content deleted Content added
Markhurd (talk | contribs)
cater for redirects and attempt to continue if the regex doesn't match
Markhurd (talk | contribs)
add missing code & whitespace; try catching mismatched regex differently
Line 19:
t=li[i].innerHTML.match(/"\/wiki\/([^"]*)"/);
 
if(t.length>1!=undefined)
t=t[1];
else
{
t=li[i].innerHTML.match(/"\/w\/index\.php\?title\=([^&]*)\&amp\;redirect\=no"/);
 
if(t!=undefined)
else
t=t[1];
else
continue;
}
 
if(li[i].getElementsByTagName("strong").length>0)
{
 
/"\/w\/index\.php\?title\=([^&]*)\&amp\;redirect\=no"/
 
if(t.length>1)
 
t=t[1];
 
else
 
continue;
 
}
 
if(li[i].getElementsByTagName("strong").length>0)
s="none";
else