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

@@ -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 );
} );