From 772adb7ed0cde405ec81d4c8464b6c1526cad660 Mon Sep 17 00:00:00 2001 From: Jakob Struye Date: Fri, 1 Feb 2019 11:52:13 +0100 Subject: [PATCH] Fixed slowed timers to also pass the params for the function to be called along --- app/ux/WebView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/ux/WebView.js b/app/ux/WebView.js index 091490f3..5b5e0940 100644 --- a/app/ux/WebView.js +++ b/app/ux/WebView.js @@ -463,7 +463,7 @@ Ext.define('Rambox.ux.WebView',{ let slowed_timers = Ext.getStore('ServicesList').getById(me.record.get('type')).get('slowed_timers'); if (slowed_timers && me.record.get('slowed_timers')) { - const slowed_timers_code = `window.setTimeout=window.setTimeout;const __setTimeout=window.setTimeout;window.setTimeout=function(func,time){let a=time;return a<100&&(a=100),__setTimeout(func,a)};`; + const slowed_timers_code = `window.setTimeout=window.setTimeout;const __setTimeout=window.setTimeout;window.setTimeout=function(func,time, ...func_args){let a=time;return a<100&&(a=100),__setTimeout(func,a, ...func_args)};`; js_inject += '{' + slowed_timers_code + '}'; } }