From: Fomafix Date: Mon, 25 Mar 2019 06:16:21 +0000 (+0100) Subject: Remove unused wgUploadWarningObj.keypress X-Git-Tag: 1.34.0-rc.0~1878^2 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=d555c302b682cea8775adc4161e041f56c577bcd;p=lhc%2Fweb%2Fwiklou.git Remove unused wgUploadWarningObj.keypress The global object wgUploadWarningObj.keypress was introduced in 80991043 and is now unused. The unmaintained extension MultiUpload uses wgUploadWarningObj.keypress but this is an old copy of upload.js Change-Id: I19974b015386e4139ea1d1c9289cef535f295c28 --- diff --git a/resources/src/mediawiki.special.upload/upload.js b/resources/src/mediawiki.special.upload/upload.js index 77ca84800c..ac2e18bfa1 100644 --- a/resources/src/mediawiki.special.upload/upload.js +++ b/resources/src/mediawiki.special.upload/upload.js @@ -20,33 +20,6 @@ delay: 500, // ms timeoutID: false, - keypress: function () { - if ( !ajaxUploadDestCheck ) { - return; - } - - // Find file to upload - if ( !$( '#wpDestFile' ).length || !$( '#wpDestFile-warning' ).length ) { - return; - } - - this.nameToCheck = $( '#wpDestFile' ).val(); - - // Clear timer - if ( this.timeoutID ) { - clearTimeout( this.timeoutID ); - } - // Check response cache - if ( Object.prototype.hasOwnProperty.call( this.responseCache, this.nameToCheck ) ) { - this.setWarning( this.responseCache[ this.nameToCheck ] ); - return; - } - - this.timeoutID = setTimeout( function () { - uploadWarning.timeout(); - }, this.delay ); - }, - checkNow: function ( fname ) { if ( !ajaxUploadDestCheck ) { return;