Consistently use setTimeout, clearTimeout and location without window

Change-Id: Ie83313b3f2a7f9bc939eb19d7a82bc980f12b0b8
This commit is contained in:
Fomafix
2019-11-07 19:28:53 +01:00
committed by jenkins-bot
parent ef741394c4
commit 6a5b9e3164
3 changed files with 9 additions and 9 deletions

View File

@@ -197,13 +197,13 @@
// if event logging is enabled, in can resole the promise
// immediately to avoid extra delays.
deferred.done( function () {
window.location.href = event.target.href;
location.href = event.target.href;
} );
mw.hook( 'mw.uls.login.click' ).fire( deferred );
// Delay is zero if event logging is not enabled
window.setTimeout( function () {
setTimeout( function () {
deferred.resolve();
}, mw.config.get( 'wgULSEventLogging' ) * 500 );
} );