Fix settings, update package.json
This commit is contained in:
parent
e73c6018ef
commit
f0b7e619e4
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "ultravidify-vue",
|
||||
"name": "ultravidify-git",
|
||||
"version": "4.0.0-a1",
|
||||
"description": "Ultrawidify but with vue settings and popup",
|
||||
"description": "Aspect ratio fixer for youtube that works around some people's disability to properly encode 21:9 (and sometimes, 16:9) videos.",
|
||||
"author": "Tamius Han <tamius.han@gmail.com>",
|
||||
"scripts": {
|
||||
"build": "cross-env NODE_ENV=production BROWSER=firefox webpack --hide-modules",
|
||||
|
@ -119,24 +119,25 @@ class Settings {
|
||||
}
|
||||
|
||||
async get() {
|
||||
let ret;
|
||||
|
||||
if (currentBrowser.firefox) {
|
||||
const ret = await browser.storage.local.get('uwSettings');
|
||||
ret = await browser.storage.local.get('uwSettings');
|
||||
} else if (currentBrowser.chrome) {
|
||||
ret = await new Promise( (resolve, reject) => {
|
||||
chrome.storage.local.get('uwSettings', (res) => resolve(res));
|
||||
});
|
||||
} else if (currentBrowser.edge) {
|
||||
ret = await new Promise( (resolve, reject) => {
|
||||
browser.storage.local.get('uwSettings', (res) => resolve(res));
|
||||
});
|
||||
}
|
||||
|
||||
try {
|
||||
return JSON.parse(ret.uwSettings);
|
||||
} catch(e) {
|
||||
return undefined;
|
||||
}
|
||||
} else if (currentBrowser.chrome) {
|
||||
const ret = await new Promise( (resolve, reject) => {
|
||||
chrome.storage.local.get('uwSettings', (res) => resolve(res));
|
||||
});
|
||||
return JSON.parse(ret['uwSettings']);
|
||||
} else if (currentBrowser.edge) {
|
||||
const ret = await new Promise( (resolve, reject) => {
|
||||
browser.storage.local.get('uwSettings', (res) => resolve(res));
|
||||
});
|
||||
return JSON.parse(ret['uwSettings']);
|
||||
}
|
||||
}
|
||||
|
||||
async set(extensionConf) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
"manifest_version": 2,
|
||||
"name": "Ultrawidify",
|
||||
"description": "Aspect ratio fixer for youtube that works around some people's disability to properly encode 21:9 (and sometimes, 16:9) videos.",
|
||||
"version": "4.0.0-a1",
|
||||
"version": "4.0.0a2",
|
||||
"applications": {
|
||||
"gecko": {
|
||||
"id": "{cf02b1a7-a01a-4e37-a609-516a283f1ed3}"
|
||||
|
Loading…
Reference in New Issue
Block a user