Merge "Remove unused wgUploadWarningObj.keypress"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 24 Apr 2019 20:09:11 +0000 (20:09 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 24 Apr 2019 20:09:11 +0000 (20:09 +0000)
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;