Merge "Apply coding conventions for JavaScript"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sat, 13 Dec 2014 19:37:49 +0000 (19:37 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sat, 13 Dec 2014 19:37:49 +0000 (19:37 +0000)
1  2 
resources/src/mediawiki/mediawiki.Title.js
resources/src/mediawiki/mediawiki.js

@@@ -8,7 -8,7 +8,7 @@@
        /**
         * @class mw.Title
         *
 -       * Parse titles into an object struture. Note that when using the constructor
 +       * Parse titles into an object structure. Note that when using the constructor
         * directly, passing invalid titles will result in an exception. Use #newFromText to use the
         * logic directly and get null for invalid titles which is easier to work with.
         *
  
                normalizeExtension = function ( extension ) {
                        // Remove only trailing space (that is removed by MW anyway)
-                       extension = extension.toLowerCase().replace(/\s*$/, '');
+                       extension = extension.toLowerCase().replace( /\s*$/, '' );
                        return extension;
                };
  
@@@ -1,7 -1,7 +1,7 @@@
  /**
   * Base library for MediaWiki.
   *
 - * Exposed as globally as `mediaWiki` with `mw` as shortcut.
 + * Exposed globally as `mediaWiki` with `mw` as shortcut.
   *
   * @class mw
   * @alternateClassName mediaWiki
@@@ -89,7 -89,7 +89,7 @@@
  
        Map.prototype = {
                /**
 -               * Get the value of one or multiple keys.
 +               * Get the value of one or multiple keys.
                 *
                 * If called with no arguments, all values will be returned.
                 *
@@@ -99,7 -99,7 +99,7 @@@
                 *  If selection was an array, returns an object of key/values (value is null if not found),
                 *  If selection was not passed or invalid, will return the 'values' object member (be careful as
                 *  objects are always passed by reference in JavaScript!).
 -               * @return {string|Object|null} Values as a string or object, null if invalid/inexistant.
 +               * @return {string|Object|null} Values as a string or object, null if invalid/inexistent.
                 */
                get: function ( selection, fallback ) {
                        var results, i;
                                                        var check = checkCssHandles;
                                                        pending++;
                                                        return function () {
-                                                               if (check) {
+                                                               if ( check ) {
                                                                        pending--;
                                                                        check();
                                                                        check = undefined; // Revoke