Fix undeclared dependency on jquery.mwExtension
authorOri Livneh <ori@wikimedia.org>
Mon, 22 Jun 2015 22:12:35 +0000 (15:12 -0700)
committerOri Livneh <ori@wikimedia.org>
Mon, 22 Jun 2015 22:12:35 +0000 (15:12 -0700)
Since jquery.mwExtension is deprecated, fix the undeclared dependency by making
the module not depend on $.ucFirst rather than by declaring the dependency.

Change-Id: I32b57662464e7dde0f61d6875196764fb61dcfba

resources/src/mediawiki/mediawiki.Title.js

index 3efb7ec..2fd7bfa 100644 (file)
                        if ( $.inArray( this.namespace, mw.config.get( 'wgCaseSensitiveNamespaces' ) ) !== -1 ) {
                                return this.title;
                        } else {
-                               return $.ucFirst( this.title );
+                               return this.title.charAt( 0 ).toUpperCase() + this.title.slice( 1 );
                        }
                },