5 const $inputs
= $( '#mw-specialmute-form input[type="checkbox"]' ),
6 $saveButton
= $( '#save' );
8 function isFormChanged() {
9 return $inputs
.is( function () {
10 return this.checked
!== this.defaultChecked
;
14 if ( $saveButton
.length
) {
15 const saveButton
= OO
.ui
.infuse( $saveButton
);
16 saveButton
.setDisabled( !isFormChanged() );
18 $inputs
.on( 'change', () => {
19 saveButton
.setDisabled( !isFormChanged() );