-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add options for closing and reloading tabs
- Loading branch information
dessant
committed
May 16, 2019
1 parent
ca31096
commit 62b780d
Showing
8 changed files
with
273 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import browser from 'webextension-polyfill'; | ||
|
||
const message = 'Add closeTabs, closePinnedTabs and reloadTabs options'; | ||
|
||
const revision = 'kuZ4zBZDX'; | ||
const downRevision = 'ByCtvupNz'; | ||
|
||
const storage = browser.storage.local; | ||
|
||
async function upgrade() { | ||
const changes = { | ||
closeTabs: 'false', // 'all', 'active', 'allButActive', 'exit', 'false' | ||
closePinnedTabs: true, | ||
reloadTabs: 'false' // 'all', 'active', 'allButActive', 'false' | ||
}; | ||
|
||
changes.storageVersion = revision; | ||
return storage.set(changes); | ||
} | ||
|
||
async function downgrade() { | ||
const changes = {}; | ||
await storage.remove(['closeTabs', 'closePinnedTabs', 'reloadTabs']); | ||
|
||
changes.storageVersion = downRevision; | ||
return storage.set(changes); | ||
} | ||
|
||
export {message, revision, upgrade, downgrade}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"versions": ["xO0Hh1Vm2", "BkFsUtt7f", "ByCtvupNz"]} | ||
{"versions": ["xO0Hh1Vm2", "BkFsUtt7f", "ByCtvupNz", "kuZ4zBZDX"]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import browser from 'webextension-polyfill'; | ||
|
||
const message = 'Add closeTabs, closePinnedTabs and reloadTabs options'; | ||
|
||
const revision = 'kuZ4zBZDX'; | ||
const downRevision = 'ByCtvupNz'; | ||
|
||
const storage = browser.storage.sync; | ||
|
||
async function upgrade() { | ||
const changes = { | ||
closeTabs: 'false', // 'all', 'active', 'allButActive', 'exit', 'false' | ||
closePinnedTabs: true, | ||
reloadTabs: 'false' // 'all', 'active', 'allButActive', 'false' | ||
}; | ||
|
||
changes.storageVersion = revision; | ||
return storage.set(changes); | ||
} | ||
|
||
async function downgrade() { | ||
const changes = {}; | ||
await storage.remove(['closeTabs', 'closePinnedTabs', 'reloadTabs']); | ||
|
||
changes.storageVersion = downRevision; | ||
return storage.set(changes); | ||
} | ||
|
||
export {message, revision, upgrade, downgrade}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"versions": ["xO0Hh1Vm2", "BkFsUtt7f", "ByCtvupNz"]} | ||
{"versions": ["xO0Hh1Vm2", "BkFsUtt7f", "ByCtvupNz", "kuZ4zBZDX"]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters