-
-
Notifications
You must be signed in to change notification settings - Fork 604
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The service is unreliable.
- Loading branch information
dessant
committed
Apr 7, 2019
1 parent
4a823f9
commit f7b9554
Showing
8 changed files
with
76 additions
and
31 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
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,28 @@ | ||
import browser from 'webextension-polyfill'; | ||
|
||
const message = 'Revision description'; | ||
|
||
const revision = 'DlgF14Chrh'; | ||
const downRevision = 'X3djS8vZC'; | ||
|
||
const storage = browser.storage.local; | ||
|
||
async function upgrade() { | ||
const changes = {}; | ||
const {speechService} = await storage.get('speechService'); | ||
if (speechService === 'googleSpeechApiDemo') { | ||
changes.speechService = 'witSpeechApiDemo'; | ||
} | ||
|
||
changes.storageVersion = revision; | ||
return storage.set(changes); | ||
} | ||
|
||
async function downgrade() { | ||
const changes = {}; | ||
|
||
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 |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
"nOedd0Txqd", | ||
"ZtLMLoh1ag", | ||
"t335iRDhZ8", | ||
"X3djS8vZC" | ||
"X3djS8vZC", | ||
"DlgF14Chrh" | ||
] | ||
} |
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,28 @@ | ||
import browser from 'webextension-polyfill'; | ||
|
||
const message = 'Revision description'; | ||
|
||
const revision = 'DlgF14Chrh'; | ||
const downRevision = 'X3djS8vZC'; | ||
|
||
const storage = browser.storage.sync; | ||
|
||
async function upgrade() { | ||
const changes = {}; | ||
const {speechService} = await storage.get('speechService'); | ||
if (speechService === 'googleSpeechApiDemo') { | ||
changes.speechService = 'witSpeechApiDemo'; | ||
} | ||
|
||
changes.storageVersion = revision; | ||
return storage.set(changes); | ||
} | ||
|
||
async function downgrade() { | ||
const changes = {}; | ||
|
||
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 |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
"nOedd0Txqd", | ||
"ZtLMLoh1ag", | ||
"t335iRDhZ8", | ||
"X3djS8vZC" | ||
"X3djS8vZC", | ||
"DlgF14Chrh" | ||
] | ||
} |