From 0b3b0a2c5816d8e8fec5086569f92298ad7758ee Mon Sep 17 00:00:00 2001 From: saturn Date: Fri, 17 Jan 2020 19:51:13 -0600 Subject: [PATCH] Added timeouts to requestIdleCallbacks to deal with sites that run JS continuously --- src/contentScript.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/contentScript.js b/src/contentScript.js index 98f4f9d..51b767d 100644 --- a/src/contentScript.js +++ b/src/contentScript.js @@ -185,7 +185,7 @@ function startConstantVigilance() { window.requestIdleCallback(() => { killSticky(); starter(); - }); + }, {timeout: 1000}); }); console.log("Commencing vigilance for stickies!"); @@ -202,7 +202,7 @@ function beginKillingStickies() { window.requestIdleCallback(() => { killSticky(); startConstantVigilance(); - }); + }, {timeout: 1000}); } /******************/