Remove unused wgUploadWarningObj.keypress
authorFomafix <fomafix@googlemail.com>
Mon, 25 Mar 2019 06:16:21 +0000 (07:16 +0100)
committerFomafix <fomafix@googlemail.com>
Tue, 23 Apr 2019 11:13:54 +0000 (13:13 +0200)
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

resources/src/mediawiki.special.upload/upload.js

index 77ca848..ac2e18b 100644 (file)
                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;