Wikipedia:WikiProject User scripts/Scripts/Watchlist since: Difference between revisions

Content deleted Content added
tweaks and bugfixes
Line 2:
 
addOnloadHook(function () {
if (unescape(window.___location.href).indexOf(!wgCanonicalSpecialPageName || wgCanonicalSpecialPageName != "Special:Watchlist") < 0) return;
if (!document.forms[0] || !document.forms[0].namespace) return;
 
// just one little ID attribute would be _so_ nice...
var nsSelectForm = document.getElementById('namespace');
while (nsSelectForm && !(nsSelectForm.tagName && nsSelectForm.tagName.toLowerCase() == 'form'))
nsSelectForm = nsSelectForm.parentNode;
if (!nsSelectForm) return;
 
var link = document.createElement('a');
Line 32 ⟶ 27:
link.appendChild(document.createTextNode('Changes'));
frag.appendChild(document.createTextNode(' since last load.'));
 
// just one little ID attribute would be _so_ nice...
var nsSelectForm = document.getElementByIdgetElementsByTagName('namespaceform')[0];
nsSelectForm.parentNode.insertBefore(frag, nsSelectForm);
});