"disallowKeywordsOnNewLine": null,
"disallowQuotedKeysInObjects": null,
+ "disallowImplicitTypeConversion": null,
+ "requireLineBreakAfterVariableAssignment": null,
+ "requireSpaceAfterLineComment": null,
+ "requireSpacesInsideParentheses": null,
"requireSpacesInsideArrayBrackets": null,
"validateIndentation": null
}
"test": "grunt test"
},
"devDependencies": {
- "grunt": "0.4.2",
+ "grunt": "0.4.5",
"grunt-banana-checker": "0.2.0",
- "grunt-contrib-jshint": "0.10.0",
+ "grunt-contrib-jshint": "0.11.0",
"grunt-contrib-watch": "0.6.1",
- "grunt-jscs": "0.8.1",
+ "grunt-jscs": "1.5.0",
"grunt-jsonlint": "1.0.4",
- "grunt-karma": "0.9.0",
+ "grunt-karma": "0.10.1",
"karma": "0.12.31",
"karma-chrome-launcher": "0.1.7",
- "karma-firefox-launcher": "0.1.3",
+ "karma-firefox-launcher": "0.1.4",
"karma-qunit": "0.1.4",
- "qunitjs": "1.15.0"
+ "qunitjs": "1.17.1"
}
}
return str.charAt( 0 ).toUpperCase() + str.slice( 1 );
},
escapeRE: function ( str ) {
- return str.replace ( /([\\{}()|.?*+\-\^$\[\]])/g, '\\$1' );
+ return str.replace( /([\\{}()|.?*+\-\^$\[\]])/g, '\\$1' );
},
isDomElement: function ( el ) {
return !!el && !!el.nodeType;
},
isEmpty: function ( v ) {
var key;
- if ( v === '' || v === 0 || v === '0' || v === null
- || v === false || v === undefined )
- {
+ if (
+ v === '' || v === 0 || v === '0' || v === null || v === false || v === undefined
+ ) {
return true;
}
// the for-loop could potentially contain prototypes
* @version 2.1.0
* @license MIT
*/
-(function ($) {
+( function ($) {
var isInputSupported = 'placeholder' in document.createElement('input'),
isTextareaSupported = 'placeholder' in document.createElement('textarea'),
$this
.filter((isInputSupported ? 'textarea' : ':input') + '[placeholder]')
- .filter(function () {
+ .filter( function () {
return !$(this).data('placeholder-enabled');
})
.bind({
propHooks.value = hooks;
}
- $(function () {
+ $( function () {
// Look for forms
$(document).delegate('form', 'submit.placeholder', function () {
// Clear the placeholder values so they don't get submitted
var $inputs = $('.placeholder', this).each(clearPlaceholder);
- setTimeout(function () {
+ setTimeout( function () {
$inputs.each(setPlaceholder);
}, 10);
});
// Clear placeholder values upon page reload
$(window).bind('beforeunload.placeholder', function () {
- $('.placeholder').each(function () {
+ $('.placeholder').each( function () {
this.value = '';
});
});
endPos = this.selectionEnd;
scrollTop = this.scrollTop;
checkSelectedText();
- if ( options.selectionStart !== undefined
- && endPos - startPos !== options.selectionEnd - options.selectionStart )
- {
+ if (
+ options.selectionStart !== undefined &&
+ endPos - startPos !== options.selectionEnd - options.selectionStart
+ ) {
// This means there is a difference in the selection range returned by browser and what we passed.
// This happens for Chrome in the case of composite characters. Ref bug #30130
// Set the startPos to the correct position.
mw.cookie.set( cookieKey, null );
}
-} ( mediaWiki, jQuery ) );
+}( mediaWiki, jQuery ) );
$( '#mw-pl-options-2' ).prop( 'checked', true );
} );
} );
-} ( jQuery ) );
+}( jQuery ) );
}
};
-} ( mediaWiki, jQuery ) );
+}( mediaWiki, jQuery ) );
} );
QUnit.test( 'updateTooltipAccessKeys - current browser', 2, function ( assert ) {
- var title = $( makeInput ( 'Title', 'a' ) ).updateTooltipAccessKeys().prop( 'title' ),
+ var title = $( makeInput( 'Title', 'a' ) ).updateTooltipAccessKeys().prop( 'title' ),
//The new title should be something like "Title [alt-a]", but the exact label will depend on the browser.
//The "a" could be capitalized, and the prefix could be anything, e.g. a simple "^" for ctrl-
//(no browser is known using such a short prefix, though) or "Alt+Umschalt+" in German Firefox.
-(function ($) {
+( function ($) {
QUnit.module('jquery.placeholder', QUnit.newMwEnvironment());
QUnit.test('caches results of feature tests', 2, function (assert) {
- assert.strictEqual(typeof $.fn.placeholder.input, 'boolean', '$.fn.placeholder.input');
- assert.strictEqual(typeof $.fn.placeholder.textarea, 'boolean', '$.fn.placeholder.textarea');
+ assert.strictEqual( typeof $.fn.placeholder.input, 'boolean', '$.fn.placeholder.input');
+ assert.strictEqual( typeof $.fn.placeholder.textarea, 'boolean', '$.fn.placeholder.textarea');
});
if ($.fn.placeholder.input && $.fn.placeholder.textarea) {
only: 'scripts'
},
dataType: 'script'
- } ).done(function () {
+ } ).done( function () {
mwLanguageCache[langCode].fire( mw.language );
} ).fail( function () {
mwLanguageCache[langCode].fire( false );