Avoid unnecessary page reloads on extension updates.
This commit is contained in:
parent
2c8ac802ea
commit
f1cf5d9535
|
@ -16,7 +16,7 @@ function deferWebTraffic(promiseToWaitFor, next) {
|
||||||
try {
|
try {
|
||||||
browser.tabs.executeScript(tabId, {
|
browser.tabs.executeScript(tabId, {
|
||||||
runAt: "document_start",
|
runAt: "document_start",
|
||||||
code: "window.location.reload(false)"
|
code: "if (performance.now() < 60000) window.location.reload(false)"
|
||||||
});
|
});
|
||||||
debug("Reloading tab", tabId);
|
debug("Reloading tab", tabId);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
Loading…
Reference in New Issue