From f169c8b3f9ed322b6d69d3aba36d3052f34bfdf8 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Wed, 11 Sep 2019 20:26:59 +0100 Subject: [PATCH] Use mw.util.debounce() in collapsibleTabs.js Bug: T213426 Depends-On: If370b959b2617d0f506ac3ed344af8c6a667e70d Change-Id: Ib006a570f9405bbd48bb7e81a3d98b562df22b00 --- collapsibleTabs.js | 6 +++--- skin.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/collapsibleTabs.js b/collapsibleTabs.js index 79036ef..a569887 100644 --- a/collapsibleTabs.js +++ b/collapsibleTabs.js @@ -4,8 +4,8 @@ * @class jQuery.plugin.collapsibleTabs */ ( function () { - var isRTL = document.documentElement.dir === 'rtl', - boundEvent = false, + var boundEvent, + isRTL = document.documentElement.dir === 'rtl', rAF = window.requestAnimationFrame || setTimeout; /** @@ -50,7 +50,7 @@ // if we haven't already bound our resize handler, bind it now if ( !boundEvent ) { boundEvent = true; - $( window ).on( 'resize', $.debounce( 100, function () { + $( window ).on( 'resize', mw.util.debounce( 100, function () { rAF( $.collapsibleTabs.handleResize ); } ) ); } diff --git a/skin.json b/skin.json index 026c6d4..8e2d10c 100644 --- a/skin.json +++ b/skin.json @@ -63,7 +63,7 @@ "vector.js" ], "dependencies": [ - "jquery.throttle-debounce", + "mediawiki.util", "jquery.tabIndex" ] }