Misc jshint fixes
* Move the invocation into the parens that contain the function. * unescaped regex * Do not wrap function literals in parens unless they are to be immediately invoked. Change-Id: Ib3360f88fb7674af0e857d8a84a91fdac1fd8487
This commit is contained in:
@@ -84,7 +84,9 @@
|
||||
this.languages = this.options.languages;
|
||||
for ( var code in this.languages ) {
|
||||
if ( $.uls.data.languages[code] === undefined ) {
|
||||
window.console && console.log && console.log( "ULS: Unknown language " + code + "." );
|
||||
if ( window.console && window.console.log ) {
|
||||
window.console.log( "ULS: Unknown language " + code + "." );
|
||||
}
|
||||
delete this.languages[code];
|
||||
}
|
||||
}
|
||||
@@ -257,11 +259,9 @@
|
||||
if ( !this.shown ) {
|
||||
return;
|
||||
}
|
||||
switch( e.keyCode ) {
|
||||
case 27: // escape
|
||||
this.hide();
|
||||
e.preventDefault();
|
||||
break;
|
||||
if ( e.keyCode === 27 ) { // escape
|
||||
this.hide();
|
||||
e.preventDefault();
|
||||
}
|
||||
e.stopPropagation();
|
||||
},
|
||||
@@ -270,11 +270,9 @@
|
||||
if ( !this.shown ) {
|
||||
return;
|
||||
}
|
||||
switch( e.keyCode ) {
|
||||
case 27: // escape
|
||||
this.hide();
|
||||
e.preventDefault();
|
||||
break;
|
||||
if ( e.keyCode === 27 ) { // escape
|
||||
this.hide();
|
||||
e.preventDefault();
|
||||
}
|
||||
e.stopPropagation();
|
||||
},
|
||||
@@ -317,4 +315,4 @@
|
||||
|
||||
$.fn.uls.Constructor = ULS;
|
||||
|
||||
} )( jQuery );
|
||||
} ( jQuery ) );
|
||||
|
||||
Reference in New Issue
Block a user