From 9fae624785b06ea2e53594b2542606ccbed3ddaf Mon Sep 17 00:00:00 2001 From: typeling1578 Date: Mon, 18 Mar 2024 13:21:21 +0900 Subject: [PATCH] Prevent the add-on from being reloaded in the current session due to an update. --- background.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/background.js b/background.js index 937ab31..da3c030 100644 --- a/background.js +++ b/background.js @@ -148,3 +148,7 @@ async function deleteHistory(details) { browser.webNavigation.onHistoryStateUpdated.addListener(deleteHistory); browser.webNavigation.onReferenceFragmentUpdated.addListener(deleteHistory); })(); + +// Prevent the add-on from being reloaded in the current session due to an update. +// https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/onUpdateAvailable +browser.runtime.onUpdateAvailable.addListener(() => {});