Wikipedia:WikiProject User scripts/Scripts/All diffs above here
From Wikipedia, the free encyclopedia
This script adds hyperlinks with the text "adah" (all diffs above here) to every entry in your watchlist, after the "diff" link. Clinking on one of them opens the corresponding diff and all the more recent ones. You can use this to study all the changes since you last checked the watchlist. This is most useful with a browser configured to open them in tabs.
Remarks:
- It is only tested with Monobook and Firefox.
- The script does not open newly created pages appearing on your watchlist.
//
function openAdahLinks(kk) { var as = document.getElementsByTagName('a'); var k = 0; for (n=0; n<as.length; n++) { if (as[n].innerHTML == 'diff') { if (k <= kk) { window.open(as[n].href, '_blank'); } k++; } } } function addAdahLinks() { if (wgCanonicalNamespace == 'Special' && wgCanonicalSpecialPageName == 'Watchlist') { var as = document.getElementsByTagName('a'); var k = 0; for (n=0; n<as.length; n++) { if (as[n].innerHTML == 'diff') { var tn = document.createTextNode(') ('); var link = document.createElement('a'); link.href = 'javascript:openAdahLinks(' + (k++) + ')'; link.appendChild(document.createTextNode('adah'), null); as[n].parentNode.insertBefore(tn , as[n].nextSibling.nextSibling); as[n].parentNode.insertBefore(link , as[n].nextSibling.nextSibling); } } } } addOnloadHook(addAdahLinks); //