mediawiki-extensions-Replac.../ReplaceText.js
Mark A. Hershberger ee7ac78ca7 Add option to not send enotifs on replacetext
On a wiki with thousands of users and an edit that affects thousands
of pages, ReplaceText should be able to make mass changes wihout
sending out a bunch of emails (which would then result in a bunch of
complaints from fairly active users with a long watchlist).

This adds a checkbox to disable emails.  This is done by telling
MediaWiki not to update the RecentChanges page since email
notifications are sent when the RC page is updated.

Bug: T177291
Change-Id: I119506e697a7f8e6bdda92183c098a2e733d6d3d
2018-03-27 16:29:17 +00:00

18 lines
463 B
JavaScript

function invertSelections() {
'use strict';
var form = document.getElementById('choose_pages' ),
num_elements = form.elements.length,
i,
cur_element;
for (i = 0; i < num_elements; i++) {
cur_element = form.elements[i];
if (cur_element.type === "checkbox" && cur_element.id !== 'create-redirect' &&
cur_element.id !== 'watch-pages' && cur_element.id !== 'doAnnounce' ) {
form.elements[i].checked = form.elements[i].checked !== true;
}
}
}