diff --git a/resources/js/ext.uls.common.js b/resources/js/ext.uls.common.js index 3b1a6e37..1a22a35a 100644 --- a/resources/js/ext.uls.common.js +++ b/resources/js/ext.uls.common.js @@ -98,7 +98,7 @@ mw.hook( 'mw.uls.interface.language.change' ).fire( language, deferred ); // Delay is zero if event logging is not enabled - window.setTimeout( function () { + setTimeout( function () { deferred.resolve(); }, mw.config.get( 'wgULSEventLogging' ) * 500 ); diff --git a/resources/js/ext.uls.displaysettings.js b/resources/js/ext.uls.displaysettings.js index 1540f20a..5b365907 100644 --- a/resources/js/ext.uls.displaysettings.js +++ b/resources/js/ext.uls.displaysettings.js @@ -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 ); } ); diff --git a/resources/js/ext.uls.interface.js b/resources/js/ext.uls.interface.js index 49ae437d..1df93afc 100644 --- a/resources/js/ext.uls.interface.js +++ b/resources/js/ext.uls.interface.js @@ -140,15 +140,15 @@ // if the mouse is over the tooltip, do not hide $( '.uls-tipsy' ).on( 'mouseover', function () { - window.clearTimeout( tipsyTimer ); + clearTimeout( tipsyTimer ); } ).on( 'mouseout', function () { - tipsyTimer = window.setTimeout( hideTipsy, timeout ); + tipsyTimer = setTimeout( hideTipsy, timeout ); } ); // hide the tooltip when clicked on it $( '.uls-tipsy' ).on( 'click', hideTipsy ); - tipsyTimer = window.setTimeout( hideTipsy, timeout ); + tipsyTimer = setTimeout( hideTipsy, timeout ); } // remove any existing popups @@ -201,7 +201,7 @@ mw.hook( 'mw.uls.language.revert' ).fire( deferred ); // Delay is zero if event logging is not enabled - window.setTimeout( function () { + setTimeout( function () { deferred.resolve(); }, mw.config.get( 'wgULSEventLogging' ) * 500 ); } ); @@ -221,7 +221,7 @@ ulsPopup.$element.appendTo( 'body' ); // The interlanguage position needs some time to settle down - window.setTimeout( function () { + setTimeout( function () { // Show the tipsy tooltip on page load. showTipsy( 6000 ); }, 700 ); @@ -375,7 +375,7 @@ // Allow styles to apply first and position to work by // delaying the activation after them. - window.setTimeout( function () { + setTimeout( function () { $ulsTrigger.trigger( 'click', eventParams ); }, 0 ); } );