Various clean up
Files: * Consistently have one (1) new line at EOF (.gitignore, *.css, *.sh) JSHint: * Separate the common (general Wikimedia code conventions) from the local more stricter rules (nice work!). Maintenance: * Use simplified $IP definition where getenv is only called once. Based on http://git.io/ve-mw-36fc3b59-makeStaticLoader JavaScript: * Use the same closure in all files: - No need for "undefined". - One linebreak between license header and start of closure (sometimes there were 1 or 2 empty lines). - ext.uls.ime.js: No need for "document" (redundant in general, but especially as it wasn't used anywhere in this file). - Use "$, mw" for all ext.* modules (one of them used "mw, $"). Change-Id: Iba5dab14bbc3fbfc9f8fe96dd2d95529587a69aa
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,4 +4,3 @@
|
||||
.*.swp
|
||||
.idea
|
||||
.bundle/
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
|
||||
"camelcase": true,
|
||||
"curly": true,
|
||||
"eqeqeq": true,
|
||||
@@ -12,7 +13,7 @@
|
||||
"trailing": true,
|
||||
"undef": true,
|
||||
"unused": true,
|
||||
"onevar": true,
|
||||
|
||||
"bitwise": true,
|
||||
"forin": false,
|
||||
"regexp": false,
|
||||
@@ -21,6 +22,8 @@
|
||||
"smarttabs": true,
|
||||
"multistr": true,
|
||||
"browser": true,
|
||||
"onevar": true,
|
||||
|
||||
"predef": [
|
||||
"mediaWiki",
|
||||
"jQuery",
|
||||
|
||||
@@ -18,19 +18,16 @@
|
||||
* @licence MIT License
|
||||
*/
|
||||
|
||||
// Standard boilerplate to define $IP
|
||||
if ( getenv( 'MW_INSTALL_PATH' ) !== false ) {
|
||||
$IP = getenv( 'MW_INSTALL_PATH' );
|
||||
} else {
|
||||
$dir = __DIR__;
|
||||
$IP = "$dir/../../..";
|
||||
$IP = getenv( 'MW_INSTALL_PATH' );
|
||||
if ( $IP === false ) {
|
||||
$IP = __DIR__ . '/../../..';
|
||||
}
|
||||
require_once "$IP/maintenance/Maintenance.php";
|
||||
|
||||
class LanguageNameIndexer extends Maintenance {
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
$this->addDescription( "Script to create language names index." );
|
||||
$this->addDescription( 'Script to create language names index.' );
|
||||
}
|
||||
|
||||
public function execute() {
|
||||
|
||||
@@ -43,4 +43,4 @@ button.uls-more-languages {
|
||||
|
||||
div.display-settings-block:hover .settings-text {
|
||||
color: #252525;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,8 +16,7 @@
|
||||
* @licence GNU General Public Licence 2.0 or later
|
||||
* @licence MIT License
|
||||
*/
|
||||
|
||||
( function ( $, mw, undefined ) {
|
||||
( function ( $, mw ) {
|
||||
'use strict';
|
||||
|
||||
var template = '<div class="uls-display-settings">'
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* @licence GNU General Public Licence 2.0 or later
|
||||
* @licence MIT License
|
||||
*/
|
||||
|
||||
( function ( $, mw ) {
|
||||
'use strict';
|
||||
|
||||
|
||||
@@ -16,8 +16,7 @@
|
||||
* @licence GNU General Public Licence 2.0 or later
|
||||
* @licence MIT License
|
||||
*/
|
||||
|
||||
( function ( mw, $ ) {
|
||||
( function ( $, mw ) {
|
||||
'use strict';
|
||||
|
||||
mw.uls = mw.uls || {};
|
||||
@@ -45,4 +44,4 @@
|
||||
}
|
||||
}
|
||||
|
||||
}( mediaWiki, jQuery ) );
|
||||
}( jQuery, mediaWiki ) );
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* @licence GNU General Public Licence 2.0 or later
|
||||
* @licence MIT License
|
||||
*/
|
||||
|
||||
( function ( $, mw ) {
|
||||
'use strict';
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
* @licence GNU General Public Licence 2.0 or later
|
||||
* @licence MIT License
|
||||
*/
|
||||
( function ( $, mw, document, undefined ) {
|
||||
( function ( $, mw ) {
|
||||
'use strict';
|
||||
|
||||
var mwImeRulesPath, inputSelector, inputPreferences, ulsIMEPreferences, customHelpLink;
|
||||
@@ -324,4 +324,4 @@
|
||||
|
||||
mw.notify( $notification.i18n() );
|
||||
}
|
||||
}( jQuery, mediaWiki, document ) );
|
||||
}( jQuery, mediaWiki ) );
|
||||
|
||||
@@ -16,8 +16,7 @@
|
||||
* @licence GNU General Public Licence 2.0 or later
|
||||
* @licence MIT License
|
||||
*/
|
||||
|
||||
( function ( $, mw, undefined ) {
|
||||
( function ( $, mw ) {
|
||||
'use strict';
|
||||
|
||||
// FIXME: Remove when ULS minimum MW version is 1.22
|
||||
|
||||
@@ -16,8 +16,7 @@
|
||||
* @licence GNU General Public Licence 2.0 or later
|
||||
* @licence MIT License
|
||||
*/
|
||||
|
||||
( function ( $, mw, undefined ) {
|
||||
( function ( $, mw ) {
|
||||
'use strict';
|
||||
|
||||
var template = '<div class="uls-input-settings">'
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* @licence GNU General Public Licence 2.0 or later
|
||||
* @licence MIT License
|
||||
*/
|
||||
|
||||
( function ( $, mw ) {
|
||||
'use strict';
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* @licence GNU General Public Licence 2.0 or later
|
||||
* @licence MIT License
|
||||
*/
|
||||
|
||||
( function ( $, mw ) {
|
||||
'use strict';
|
||||
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
* @licence GNU General Public Licence 2.0 or later
|
||||
* @licence MIT License
|
||||
*/
|
||||
|
||||
( function ( $, mw, undefined ) {
|
||||
( function ( $, mw ) {
|
||||
'use strict';
|
||||
|
||||
var ULSPreferences,
|
||||
|
||||
@@ -16,8 +16,9 @@
|
||||
* @licence GNU General Public Licence 2.0 or later
|
||||
* @licence MIT License
|
||||
*/
|
||||
( function ( $, mw, undefined ) {
|
||||
( function ( $, mw ) {
|
||||
'use strict';
|
||||
|
||||
var mediawikiFontRepository, ulsPreferences,
|
||||
// Text to prepend the sample text. 0D00 is an unassigned unicode point.
|
||||
tofuSalt = '\u0D00',
|
||||
|
||||
@@ -7,4 +7,4 @@ UPSTREAM="https://github.com/wikimedia/jquery.i18n.git";
|
||||
echo -e "Getting latest jquery.i18n from $UPSTREAM\n";
|
||||
if cd $CLONEDIR; then git pull; else git clone $UPSTREAM $CLONEDIR; fi
|
||||
cd $HERE;
|
||||
cp -rf $CLONEDIR/src/* $DEST
|
||||
cp -rf $CLONEDIR/src/* $DEST
|
||||
|
||||
@@ -10,4 +10,4 @@ cd $CLONEDIR;
|
||||
npm install;
|
||||
grunt copy concat;
|
||||
cd $HERE;
|
||||
cp -rf $CLONEDIR/dist/jquery.ime/{images,css,rules,jquery.ime.js} $DEST;
|
||||
cp -rf $CLONEDIR/dist/jquery.ime/{images,css,rules,jquery.ime.js} $DEST;
|
||||
|
||||
@@ -7,4 +7,4 @@ UPSTREAM="https://github.com/wikimedia/jquery.uls.git";
|
||||
echo -e "Getting latest jquery.uls from $UPSTREAM\n";
|
||||
if cd $CLONEDIR; then git pull; else git clone $UPSTREAM $CLONEDIR; fi
|
||||
cd $HERE;
|
||||
cp -rf $CLONEDIR/{images,css,src,i18n} $DEST
|
||||
cp -rf $CLONEDIR/{images,css,src,i18n} $DEST
|
||||
|
||||
@@ -7,4 +7,4 @@ UPSTREAM="https://github.com/wikimedia/jquery.webfonts.git";
|
||||
echo -e "Getting latest jquery.webfonts from $UPSTREAM\n";
|
||||
if cd $CLONEDIR; then git pull; else git clone $UPSTREAM $CLONEDIR; fi
|
||||
cd $HERE;
|
||||
cp -rf $CLONEDIR/src/* $DEST
|
||||
cp -rf $CLONEDIR/src/* $DEST
|
||||
|
||||
Reference in New Issue
Block a user