User:Dantheox/watchlistdiff.js

// function instrumentWLgroup(g) { var edits = g.getElementsByTagName('a'); var re = new RegExp(/curid=\d+&oldid=(\d+)/); var pre = new RegExp(/^(.*?\/w\/index.php\?title=[^&]+)/); var grp = g.id; var ids = new Array; var pageLink = null; for (var i=0; i<edits.length; i++) { var m = re.exec(edits[i].href); if (m != null && edits[i].href.match(/&diff=/) == null) { // This is a link to a particular revision being listed on the watchlist ids.push(m[1]); }		m = pre.exec(edits[i].href); if (m != null && edits[i].href.match(/&diff=/)) { pageLink = m[1]; }	}

for (var i=0; i" + 				" ";			g.replaceChild(newNode, n);		}	} }

function watchListGroup { if (window.location.href.indexOf("Special:Watchlist") != -1) { var items=document.getElementById('bodyContent').getElementsByTagName('div'); for (var i=0; i<items.length; i++) { if (items[i].id.match(/RCI\d+/)) { instrumentWLgroup(items[i]); }		}	} }

addOnloadHook(watchListGroup); //