2 * Allows users to perform all / none / invert operations on a list of
3 * checkboxes on the page.
6 * @author Luke Faraone <luke at faraone dot cc>
8 * Based on ext.nuke.js from https://www.mediawiki.org/wiki/Extension:Nuke by
9 * Jeroen De Dauw <jeroendedauw at gmail dot com>
12 ( function ( mw
, $ ) {
16 var $checkboxes
= $( 'li input[type=checkbox]' );
18 function selectAll( check
) {
19 $checkboxes
.prop( 'checked', check
);
22 $( '.mw-checkbox-all' ).click( function ( e
) {
26 $( '.mw-checkbox-none' ).click( function ( e
) {
30 $( '.mw-checkbox-invert' ).click( function ( e
) {
31 $checkboxes
.each( function () {
32 $( this ).prop( 'checked', !$( this ).is( ':checked' ) );
39 }( mediaWiki
, jQuery
) );