// Check if all of the form values are unchanged
function isPrefsChanged() {
- var inputs = $( '#mw-prefs-form :input' ),
+ var inputs = $( '#mw-prefs-form :input[name]' ),
input, $input, inputType,
index, optIndex,
opt;
$input = $( input );
// Different types of inputs have different methods for accessing defaults
- if ( $input.is( 'select' ) ) { // <select> has the property defaultSelected for each option
+ if ( $input.is( 'select' ) ) {
+ // <select> has the property defaultSelected for each option
for ( optIndex = 0; optIndex < input.options.length; optIndex++ ) {
opt = input.options[ optIndex ];
if ( opt.selected !== opt.defaultSelected ) {