mirror of https://github.com/dessant/buster
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
684 B
JavaScript
29 lines
684 B
JavaScript
import browser from 'webextension-polyfill';
|
|
|
|
const message = 'Add IBM Watson Speech to Text API';
|
|
|
|
const revision = 'ONiJBs00o';
|
|
const downRevision = 'UoT3kGyBH';
|
|
|
|
const storage = browser.storage.local;
|
|
|
|
async function upgrade() {
|
|
const changes = {
|
|
ibmSpeechApiLoc: 'frankfurt', // 'frankfurt', 'dallas', 'washington', 'sydney', 'tokyo'
|
|
ibmSpeechApiKey: ''
|
|
};
|
|
|
|
changes.storageVersion = revision;
|
|
return storage.set(changes);
|
|
}
|
|
|
|
async function downgrade() {
|
|
const changes = {};
|
|
await storage.remove(['ibmSpeechApiLoc', 'ibmSpeechApiKey']);
|
|
|
|
changes.storageVersion = downRevision;
|
|
return storage.set(changes);
|
|
}
|
|
|
|
export {message, revision, upgrade, downgrade};
|