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.
27 lines
578 B
JavaScript
27 lines
578 B
JavaScript
import browser from 'webextension-polyfill';
|
|
|
|
const message = 'Initial version';
|
|
|
|
const revision = 'UoT3kGyBH';
|
|
const downRevision = null;
|
|
|
|
const storage = browser.storage.sync;
|
|
|
|
async function upgrade() {
|
|
const changes = {
|
|
speechService: 'googleSpeechApiDemo', // 'googleSpeechApiDemo', 'googleSpeechApi'
|
|
googleSpeechApiKey: '',
|
|
installTime: new Date().getTime(),
|
|
useCount: 0
|
|
};
|
|
|
|
changes.storageVersion = revision;
|
|
return storage.set(changes);
|
|
}
|
|
|
|
async function downgrade() {
|
|
return storage.clear();
|
|
}
|
|
|
|
export {message, revision, upgrade, downgrade};
|