From f1cf5d9535d997de0c12082be3a738de4c1d2b8b Mon Sep 17 00:00:00 2001 From: hackademix Date: Fri, 18 Oct 2019 10:49:16 +0200 Subject: Avoid unnecessary page reloads on extension updates. --- src/bg/deferWebTraffic.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bg/deferWebTraffic.js b/src/bg/deferWebTraffic.js index 571073a..fcfb0b9 100644 --- a/src/bg/deferWebTraffic.js +++ b/src/bg/deferWebTraffic.js @@ -16,7 +16,7 @@ function deferWebTraffic(promiseToWaitFor, next) { try { browser.tabs.executeScript(tabId, { runAt: "document_start", - code: "window.location.reload(false)" + code: "if (performance.now() < 60000) window.location.reload(false)" }); debug("Reloading tab", tabId); } catch (e) { -- cgit v1.2.3