mediawiki-extensions-Replac.../ReplaceText.js
Siebrand Mazeland 4eec59a457 Maintenance for ReplaceText extension.
* Now requires MediaWiki 1.18 or later.
* Use strict in JavaScript and update with JSHint/JSLint suggestions.
* Deglobalisation.
* Replace deprecated methods, remove pre 1.18 BC code.
* Update docs.
* Break long lines.
* Add FIXME where needed.

Change-Id: If9fe1e314937438227458cb07cda7f734043801f
2012-11-07 07:37:05 +00:00

17 lines
424 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') {
form.elements[i].checked = form.elements[i].checked !== true;
}
}
}