Skip to content

Commit e29a716

Browse files
committed
Add browser polyfill
1 parent 550e387 commit e29a716

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

src/background/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class Background {
153153
*/
154154
getTab = (tab) => {
155155
return new Promise((resolve) => {
156-
ext.tabs.get(tab.id, function (newTab) {
156+
browser.tabs.get(tab.id, function (newTab) {
157157
resolve(newTab);
158158
});
159159
});

src/manifest-ff.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "__MSG_appName__",
3-
"version": "1.0.0",
3+
"version": "2.0",
44
"manifest_version": 2,
55
"description": "__MSG_appDescription__",
66
"icons": {

src/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "__MSG_appName__",
33
"author": "WebDEV",
4-
"version": "1.0.0",
4+
"version": "2.0",
55
"manifest_version": 2,
66
"description": "__MSG_appDescription__",
77
"icons": {

src/utils/storage.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
import ext from "./ext";
1+
import browser from "webextension-polyfill";
22

3-
module.exports = ext.storage.sync ? ext.storage.sync : ext.storage.local;
3+
module.exports = browser.storage.sync
4+
? browser.storage.sync
5+
: browser.storage.local;

0 commit comments

Comments
 (0)