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
|
.*.swp
|
||||||
.idea
|
.idea
|
||||||
.bundle/
|
.bundle/
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
|
||||||
"camelcase": true,
|
"camelcase": true,
|
||||||
"curly": true,
|
"curly": true,
|
||||||
"eqeqeq": true,
|
"eqeqeq": true,
|
||||||
@@ -12,7 +13,7 @@
|
|||||||
"trailing": true,
|
"trailing": true,
|
||||||
"undef": true,
|
"undef": true,
|
||||||
"unused": true,
|
"unused": true,
|
||||||
"onevar": true,
|
|
||||||
"bitwise": true,
|
"bitwise": true,
|
||||||
"forin": false,
|
"forin": false,
|
||||||
"regexp": false,
|
"regexp": false,
|
||||||
@@ -21,6 +22,8 @@
|
|||||||
"smarttabs": true,
|
"smarttabs": true,
|
||||||
"multistr": true,
|
"multistr": true,
|
||||||
"browser": true,
|
"browser": true,
|
||||||
|
"onevar": true,
|
||||||
|
|
||||||
"predef": [
|
"predef": [
|
||||||
"mediaWiki",
|
"mediaWiki",
|
||||||
"jQuery",
|
"jQuery",
|
||||||
|
|||||||
@@ -18,19 +18,16 @@
|
|||||||
* @licence MIT License
|
* @licence MIT License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Standard boilerplate to define $IP
|
$IP = getenv( 'MW_INSTALL_PATH' );
|
||||||
if ( getenv( 'MW_INSTALL_PATH' ) !== false ) {
|
if ( $IP === false ) {
|
||||||
$IP = getenv( 'MW_INSTALL_PATH' );
|
$IP = __DIR__ . '/../../..';
|
||||||
} else {
|
|
||||||
$dir = __DIR__;
|
|
||||||
$IP = "$dir/../../..";
|
|
||||||
}
|
}
|
||||||
require_once "$IP/maintenance/Maintenance.php";
|
require_once "$IP/maintenance/Maintenance.php";
|
||||||
|
|
||||||
class LanguageNameIndexer extends Maintenance {
|
class LanguageNameIndexer extends Maintenance {
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
$this->addDescription( "Script to create language names index." );
|
$this->addDescription( 'Script to create language names index.' );
|
||||||
}
|
}
|
||||||
|
|
||||||
public function execute() {
|
public function execute() {
|
||||||
|
|||||||
@@ -16,8 +16,7 @@
|
|||||||
* @licence GNU General Public Licence 2.0 or later
|
* @licence GNU General Public Licence 2.0 or later
|
||||||
* @licence MIT License
|
* @licence MIT License
|
||||||
*/
|
*/
|
||||||
|
( function ( $, mw ) {
|
||||||
( function ( $, mw, undefined ) {
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var template = '<div class="uls-display-settings">'
|
var template = '<div class="uls-display-settings">'
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
* @licence GNU General Public Licence 2.0 or later
|
* @licence GNU General Public Licence 2.0 or later
|
||||||
* @licence MIT License
|
* @licence MIT License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
( function ( $, mw ) {
|
( function ( $, mw ) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|||||||
@@ -16,8 +16,7 @@
|
|||||||
* @licence GNU General Public Licence 2.0 or later
|
* @licence GNU General Public Licence 2.0 or later
|
||||||
* @licence MIT License
|
* @licence MIT License
|
||||||
*/
|
*/
|
||||||
|
( function ( $, mw ) {
|
||||||
( function ( mw, $ ) {
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
mw.uls = mw.uls || {};
|
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 GNU General Public Licence 2.0 or later
|
||||||
* @licence MIT License
|
* @licence MIT License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
( function ( $, mw ) {
|
( function ( $, mw ) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* @licence GNU General Public Licence 2.0 or later
|
* @licence GNU General Public Licence 2.0 or later
|
||||||
* @licence MIT License
|
* @licence MIT License
|
||||||
*/
|
*/
|
||||||
( function ( $, mw, document, undefined ) {
|
( function ( $, mw ) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var mwImeRulesPath, inputSelector, inputPreferences, ulsIMEPreferences, customHelpLink;
|
var mwImeRulesPath, inputSelector, inputPreferences, ulsIMEPreferences, customHelpLink;
|
||||||
@@ -324,4 +324,4 @@
|
|||||||
|
|
||||||
mw.notify( $notification.i18n() );
|
mw.notify( $notification.i18n() );
|
||||||
}
|
}
|
||||||
}( jQuery, mediaWiki, document ) );
|
}( jQuery, mediaWiki ) );
|
||||||
|
|||||||
@@ -16,8 +16,7 @@
|
|||||||
* @licence GNU General Public Licence 2.0 or later
|
* @licence GNU General Public Licence 2.0 or later
|
||||||
* @licence MIT License
|
* @licence MIT License
|
||||||
*/
|
*/
|
||||||
|
( function ( $, mw ) {
|
||||||
( function ( $, mw, undefined ) {
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
// FIXME: Remove when ULS minimum MW version is 1.22
|
// FIXME: Remove when ULS minimum MW version is 1.22
|
||||||
|
|||||||
@@ -16,8 +16,7 @@
|
|||||||
* @licence GNU General Public Licence 2.0 or later
|
* @licence GNU General Public Licence 2.0 or later
|
||||||
* @licence MIT License
|
* @licence MIT License
|
||||||
*/
|
*/
|
||||||
|
( function ( $, mw ) {
|
||||||
( function ( $, mw, undefined ) {
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var template = '<div class="uls-input-settings">'
|
var template = '<div class="uls-input-settings">'
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
* @licence GNU General Public Licence 2.0 or later
|
* @licence GNU General Public Licence 2.0 or later
|
||||||
* @licence MIT License
|
* @licence MIT License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
( function ( $, mw ) {
|
( function ( $, mw ) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
* @licence GNU General Public Licence 2.0 or later
|
* @licence GNU General Public Licence 2.0 or later
|
||||||
* @licence MIT License
|
* @licence MIT License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
( function ( $, mw ) {
|
( function ( $, mw ) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|||||||
@@ -17,8 +17,7 @@
|
|||||||
* @licence GNU General Public Licence 2.0 or later
|
* @licence GNU General Public Licence 2.0 or later
|
||||||
* @licence MIT License
|
* @licence MIT License
|
||||||
*/
|
*/
|
||||||
|
( function ( $, mw ) {
|
||||||
( function ( $, mw, undefined ) {
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var ULSPreferences,
|
var ULSPreferences,
|
||||||
|
|||||||
@@ -16,8 +16,9 @@
|
|||||||
* @licence GNU General Public Licence 2.0 or later
|
* @licence GNU General Public Licence 2.0 or later
|
||||||
* @licence MIT License
|
* @licence MIT License
|
||||||
*/
|
*/
|
||||||
( function ( $, mw, undefined ) {
|
( function ( $, mw ) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var mediawikiFontRepository, ulsPreferences,
|
var mediawikiFontRepository, ulsPreferences,
|
||||||
// Text to prepend the sample text. 0D00 is an unassigned unicode point.
|
// Text to prepend the sample text. 0D00 is an unassigned unicode point.
|
||||||
tofuSalt = '\u0D00',
|
tofuSalt = '\u0D00',
|
||||||
|
|||||||
Reference in New Issue
Block a user