Skip to content

Commit

Permalink
feat: use non-persistent background page in Firefox
Browse files Browse the repository at this point in the history
BREAKING CHANGE: browser versions older than Firefox 115
are no longer supported
  • Loading branch information
dessant committed Nov 6, 2023
1 parent 86e970f commit b629343
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .browserslistrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Opera >= 78
Edge >= 92

[firefox]
Firefox >= 91
FirefoxAndroid >= 91
Firefox >= 115
FirefoxAndroid >= 115

[opera]
Opera >= 78
Expand Down
8 changes: 6 additions & 2 deletions src/assets/manifest/firefox.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
},

Expand Down Expand Up @@ -78,7 +81,8 @@
},

"background": {
"page": "src/background/index.html"
"page": "src/background/index.html",
"persistent": false
},

"content_scripts": [
Expand Down
2 changes: 1 addition & 1 deletion src/utils/registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ async function addStorageItem(
isTask = false
} = {}
) {
if (area === 'indexeddb' && !['safari'].includes(targetEnv)) {
if (area === 'indexeddb' && !['firefox', 'safari'].includes(targetEnv)) {
area = 'memory';
}

Expand Down

0 comments on commit b629343

Please sign in to comment.