Fix settings, update package.json

This commit is contained in:
Tamius Han 2019-05-10 19:21:17 +02:00
parent e73c6018ef
commit f0b7e619e4
3 changed files with 14 additions and 13 deletions

View File

@ -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",

View File

@ -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) {

View File

@ -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}"