From 253eb5e85ad44e422a65a6ca4b5ae4650ae682bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Beyou?= Date: Tue, 27 Apr 2021 20:09:01 +0200 Subject: [PATCH] Replace use of deprecated $.debounce() Bug: T213426 Change-Id: I1502a1bd68ea260e94a47fcce047bafce3e47f0b --- extension.json | 2 +- resources/ext.inputBox.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extension.json b/extension.json index c42f896f..58edb998 100644 --- a/extension.json +++ b/extension.json @@ -35,7 +35,7 @@ "ext.inputBox": { "scripts": "ext.inputBox.js", "dependencies": [ - "jquery.throttle-debounce" + "mediawiki.util" ], "targets": [ "mobile", diff --git a/resources/ext.inputBox.js b/resources/ext.inputBox.js index b052758c..5bb720ad 100644 --- a/resources/ext.inputBox.js +++ b/resources/ext.inputBox.js @@ -24,6 +24,6 @@ onChange.call( $input.get( i ) ); } - $input.on( 'keyup input change', $.debounce( 50, onChange ) ); + $input.on( 'keyup input change', mw.util.debounce( 50, onChange ) ); } ); }( jQuery, mediaWiki ) );