From d555c302b682cea8775adc4161e041f56c577bcd Mon Sep 17 00:00:00 2001 From: Fomafix Date: Mon, 25 Mar 2019 07:16:21 +0100 Subject: [PATCH] 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 --- .../src/mediawiki.special.upload/upload.js | 27 ------------------- 1 file changed, 27 deletions(-) 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; -- 2.20.1