MediaWiki:Gadget-morebits.js: Difference between revisions
Content deleted Content added
Amorymeltzer (talk | contribs) Repo at e2e8fad: Fix handling of circular redirect page load; Handle alternate capitalizations regardless of namespace; Morebits.namespaceRegex for matching all namespace capitalizations and aliases, use in morebits and modules |
Amorymeltzer (talk | contribs) Repo at f9aea90: Update watchlist expiry handling for expiry return after T268834 |
||
Line 2,586:
}
if (ctx.watchlistExpiry &&
query.watchlistexpiry = ctx.watchlistExpiry;
}
Line 3,083:
};
/**
* unless it's being watched temporarily, in which case returns the
* expiry string.
*/
this.getWatched = function () {
return ctx.watched;
Line 3,428 ⟶ 3,432:
action = typeof action !== 'undefined' ? action : 'edit'; // IE doesn't support default parameters
// If a watchlist expiry is set,
// to avoid overwriting indefinite protection
if (ctx.watchlistExpiry) {
return false;
Line 3,535 ⟶ 3,539:
ctx.contentModel = page.contentmodel;
ctx.watched = page.watchlistexpiry || page.watched;
// extract protection info, to alert admins when they are about to edit a protected page
Line 3,900 ⟶ 3,904:
token = response.tokens.csrftoken;
pageTitle = page.title;
ctx.watched =
}
Line 3,917 ⟶ 3,922:
}
if (ctx.watchlistExpiry &&
query.watchlistexpiry = ctx.watchlistExpiry;
}
Line 4,046 ⟶ 4,051:
token = response.tokens.csrftoken;
pageTitle = page.title;
ctx.watched =
}
Line 4,062 ⟶ 4,068:
}
if (ctx.watchlistExpiry &&
query.watchlistexpiry = ctx.watchlistExpiry;
}
Line 4,110 ⟶ 4,116:
token = response.tokens.csrftoken;
pageTitle = page.title;
ctx.watched =
}
Line 4,126 ⟶ 4,133:
}
if (ctx.watchlistExpiry &&
query.watchlistexpiry = ctx.watchlistExpiry;
}
Line 4,174 ⟶ 4,181:
var token = response.tokens.csrftoken;
var
var pageTitle = page.title;
ctx.watched =
// Fetch existing protection levels
Line 4,260 ⟶ 4,268:
}
if (ctx.watchlistExpiry &&
query.watchlistexpiry = ctx.watchlistExpiry;
}
Line 4,287 ⟶ 4,295:
token = response.tokens.csrftoken;
pageTitle = page.title;
// ctx.watched = page.watchlistexpiry || page.watched;
}
Line 4,304 ⟶ 4,314:
/* Doesn't support watchlist expiry [[phab:T263336]]
if (ctx.watchlistExpiry &&
query.watchlistexpiry = ctx.watchlistExpiry;
}
|