Wikipedia:WikiProject User scripts/Scripts/Watchlist since: Difference between revisions
Content deleted Content added
SW: Revert to revision 98951338 dated 2007-01-06 21:37:44 by Ilmari Karonen using popups |
change source to syntaxhighlight |
||
(5 intermediate revisions by 4 users not shown) | |||
Line 1:
// Adds a "Changes since last load" link to your watchlist. <
addOnloadHook(function () {
if (!mw.config.get('wgCanonicalSpecialPageName') || mw.config.get('wgCanonicalSpecialPageName') != "Watchlist") return;
if (!document.forms[0] || !document.forms[0].namespace) return;
Line 12:
var fixLinkHref = function () {
var url = window.___location.href.split('#')[0];
var days = (( +(new Date()) - then ) + (60 * 1000)) / (1000 * 3600 * 24);
if (url.match(/[?&]days=/))
this.href = url.replace(/([?&]days=)[^&]*/, '$1'+days);
Line 33:
});
//</
|