Skip to content

Commit

Permalink
fix a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Kholid060 committed Aug 2, 2019
1 parent 9c1c01f commit b3421e4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "oTab",
"version": "0.9.1",
"name": "oTab-WebExtension",
"version": "0.9.2",
"description": "a better way to organize your browser and manage your notes and tasks in one place.",
"author": "kholid060 <[email protected]>",
"license": "MIT",
Expand Down
9 changes: 8 additions & 1 deletion src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import './store/';

global.browser = require('webextension-polyfill');

browser.runtime.onInstalled.addListener(async e => {
browser.runtime.onInstalled.addListener(async () => {
let storage = browser.storage.sync;
let data = await storage.get('myApp');
if (Object.entries(data).length === 0 && data.constructor === Object) {
Expand Down Expand Up @@ -72,5 +72,12 @@ browser.runtime.onInstalled.addListener(async e => {
},
},
});
}else{
storage.set({
oTabMenu: '0'
})
storage.set({
oTabData: data.myApp
})
}
});
4 changes: 2 additions & 2 deletions src/manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "override",
"name": "oTab - WebExtension",
"description": "a better way to organize your browser and manage your notes and tasks in one place.",
"version": null,
"manifest_version": 2,
Expand All @@ -8,7 +8,7 @@
"128": "icons/icon_128.png"
},
"browser_action": {
"default_title": "override",
"default_title": "oTab - WebExtension",
"default_popup": "popup/popup.html"
},
"background": {
Expand Down

0 comments on commit b3421e4

Please sign in to comment.