mirror of https://github.com/dessant/buster
feat: add IBM Speech to Text
parent
f51c3b8d2a
commit
58f9106f41
@ -0,0 +1,28 @@
|
|||||||
|
import browser from 'webextension-polyfill';
|
||||||
|
|
||||||
|
const message = 'Add IBM Speech to Text';
|
||||||
|
|
||||||
|
const revision = 'ONiJBs00o';
|
||||||
|
const downRevision = 'UoT3kGyBH';
|
||||||
|
|
||||||
|
const storage = browser.storage.local;
|
||||||
|
|
||||||
|
async function upgrade() {
|
||||||
|
const changes = {
|
||||||
|
ibmSpeechApiUrl: '',
|
||||||
|
ibmSpeechApiKey: ''
|
||||||
|
};
|
||||||
|
|
||||||
|
changes.storageVersion = revision;
|
||||||
|
return storage.set(changes);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function downgrade() {
|
||||||
|
const changes = {};
|
||||||
|
await storage.remove(['ibmSpeechApiUrl', 'ibmSpeechApiKey']);
|
||||||
|
|
||||||
|
changes.storageVersion = downRevision;
|
||||||
|
return storage.set(changes);
|
||||||
|
}
|
||||||
|
|
||||||
|
export {message, revision, upgrade, downgrade};
|
@ -1 +1 @@
|
|||||||
{"versions": ["UoT3kGyBH"]}
|
{"versions": ["UoT3kGyBH", "ONiJBs00o"]}
|
||||||
|
@ -0,0 +1,28 @@
|
|||||||
|
import browser from 'webextension-polyfill';
|
||||||
|
|
||||||
|
const message = 'Add IBM Speech to Text';
|
||||||
|
|
||||||
|
const revision = 'ONiJBs00o';
|
||||||
|
const downRevision = 'UoT3kGyBH';
|
||||||
|
|
||||||
|
const storage = browser.storage.sync;
|
||||||
|
|
||||||
|
async function upgrade() {
|
||||||
|
const changes = {
|
||||||
|
ibmSpeechApiUrl: '',
|
||||||
|
ibmSpeechApiKey: ''
|
||||||
|
};
|
||||||
|
|
||||||
|
changes.storageVersion = revision;
|
||||||
|
return storage.set(changes);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function downgrade() {
|
||||||
|
const changes = {};
|
||||||
|
await storage.remove(['ibmSpeechApiUrl', 'ibmSpeechApiKey']);
|
||||||
|
|
||||||
|
changes.storageVersion = downRevision;
|
||||||
|
return storage.set(changes);
|
||||||
|
}
|
||||||
|
|
||||||
|
export {message, revision, upgrade, downgrade};
|
@ -1 +1 @@
|
|||||||
{"versions": ["UoT3kGyBH"]}
|
{"versions": ["UoT3kGyBH", "ONiJBs00o"]}
|
||||||
|
Loading…
Reference in New Issue