Merge "resourceloader: Simplify StringSet fallback"
[lhc/web/wiklou.git] / resources / src / mediawiki.widgets / mw.widgets.TitleInputWidget.js
index 98d07f3..fa8b967 100644 (file)
@@ -4,7 +4,9 @@
  * @copyright 2011-2015 MediaWiki Widgets Team and others; see AUTHORS.txt
  * @license The MIT License (MIT); see LICENSE.txt
  */
-( function ( $, mw ) {
+( function () {
+
+       var trimByteLength = require( 'mediawiki.String' ).trimByteLength;
 
        /**
         * Creates an mw.widgets.TitleInputWidget object.
                // Parent method
                value = mw.widgets.TitleInputWidget.parent.prototype.cleanUpValue.call( this, value );
 
-               return $.trimByteLength( this.value, value, this.maxLength, function ( value ) {
+               return trimByteLength( this.value, value, this.maxLength, function ( value ) {
                        var title = widget.getMWTitle( value );
                        return title ? title.getMain() : value;
                } ).newVal;
        };
 
-}( jQuery, mediaWiki ) );
+}() );