mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ReplaceText
synced 2024-11-15 10:59:28 +00:00
4eec59a457
* 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
17 lines
424 B
JavaScript
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;
|
|
}
|
|
}
|
|
}
|