MediaWiki:Gadget-morebits.js: Difference between revisions
Content deleted Content added
Amorymeltzer (talk | contribs) Repo at b4fbbb94: Fix bug in getting new token |
Amorymeltzer (talk | contribs) Repo at 27733512: swallow fake triage success; triage: Don't assume we're triaging the current page; Fix bug inverting whether we need to query protection status |
||
Line 2,823:
this.triage = function() {
// Fall back to patrol if not a valid triage namespace
if (mw.config.get('pageTriageNamespaces').indexOf(new mw.
this.patrol();
} else {
Line 3,020:
// do we need to fetch the edit protection expiry?
if (Morebits.userIsSysop && !ctx.suppressProtectWarning) {
if (new mw.Title(Morebits.pageNameNorm).getPrefixedText()
return false;
}
Line 3,488:
var triageStat = new Morebits.status('Marking page as curated');
ctx.triageProcessApi = new Morebits.wiki.api('curating page...', query,
ctx.triageProcessApi.setParent(this);
ctx.triageProcessApi.post();
};
// callback from triageProcessApi.post()
var fnProcessTriageSuccess = function() {
// Swallow succesful return if nothing changed i.e. page in queue and already triaged
if ($(ctx.triageProcessApi.getResponse()).find('pagetriageaction').attr('pagetriage_unchanged_status')) {
ctx.triageProcessApi.getStatusElement().unlink();
}
};
|