User:Ahecht/Scripts/refresh.js: Difference between revisions

Content deleted Content added
fix purge, add refreshReuseBubble option
purge 50 at a time
Tag: Reverted
Line 55:
function postSuccess() {
var tag = reuse ? 0 : count;
mw.notify(++count += " of "count + totalCount( +(action == "purge") page? ((apiParams.titles.match(s/\|/g) were|| updated",[]).length {+ tag:1) "bubble"+tag: }1 );
mw.notify(count + " of " + totalCount + " page(s) were updated", { tag: "bubble"+tag } );
postDone();
}
Line 62 ⟶ 63:
if (action == "purge") {
apiParams.titles = pageList.shiftsplice(0, 50).join('|');
apiParams.forcerecursivelinkupdate = "1";
new mw.Api().post(apiParams).fail(postFail).done(postSuccess);