From b6293436ee811a710c792490a7f30505f629bc05 Mon Sep 17 00:00:00 2001 From: dessant Date: Mon, 6 Nov 2023 03:01:40 +0200 Subject: [PATCH] feat: use non-persistent background page in Firefox BREAKING CHANGE: browser versions older than Firefox 115 are no longer supported --- .browserslistrc | 4 ++-- src/assets/manifest/firefox.json | 8 ++++++-- src/utils/registry.js | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.browserslistrc b/.browserslistrc index 43b4185..bae3b36 100644 --- a/.browserslistrc +++ b/.browserslistrc @@ -7,8 +7,8 @@ Opera >= 78 Edge >= 92 [firefox] -Firefox >= 91 -FirefoxAndroid >= 91 +Firefox >= 115 +FirefoxAndroid >= 115 [opera] Opera >= 78 diff --git a/src/assets/manifest/firefox.json b/src/assets/manifest/firefox.json index d3da252..0b47dbf 100755 --- a/src/assets/manifest/firefox.json +++ b/src/assets/manifest/firefox.json @@ -10,7 +10,10 @@ "browser_specific_settings": { "gecko": { "id": "{d07ccf11-c0cd-4938-a265-2a4d6ad01189}", - "strict_min_version": "91.0" + "strict_min_version": "115.0" + }, + "gecko_android": { + "strict_min_version": "115.0" } }, @@ -78,7 +81,8 @@ }, "background": { - "page": "src/background/index.html" + "page": "src/background/index.html", + "persistent": false }, "content_scripts": [ diff --git a/src/utils/registry.js b/src/utils/registry.js index a8ab405..d93af16 100644 --- a/src/utils/registry.js +++ b/src/utils/registry.js @@ -95,7 +95,7 @@ async function addStorageItem( isTask = false } = {} ) { - if (area === 'indexeddb' && !['safari'].includes(targetEnv)) { + if (area === 'indexeddb' && !['firefox', 'safari'].includes(targetEnv)) { area = 'memory'; }