diff --git a/package.json b/package.json index 609c27e..5ad3f7f 100644 --- a/package.json +++ b/package.json @@ -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 ", "scripts": { "build": "cross-env NODE_ENV=production BROWSER=firefox webpack --hide-modules", diff --git a/src/ext/lib/Settings.js b/src/ext/lib/Settings.js index cdbdd1e..5d6ff40 100644 --- a/src/ext/lib/Settings.js +++ b/src/ext/lib/Settings.js @@ -119,23 +119,24 @@ class Settings { } async get() { + let ret; + if (currentBrowser.firefox) { - const ret = await browser.storage.local.get('uwSettings'); - try { - return JSON.parse(ret.uwSettings); - } catch(e) { - return undefined; - } + ret = await browser.storage.local.get('uwSettings'); } else if (currentBrowser.chrome) { - const ret = await new Promise( (resolve, reject) => { + 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) => { + ret = await new Promise( (resolve, reject) => { browser.storage.local.get('uwSettings', (res) => resolve(res)); }); - return JSON.parse(ret['uwSettings']); + } + + try { + return JSON.parse(ret.uwSettings); + } catch(e) { + return undefined; } } diff --git a/src/manifest.json b/src/manifest.json index 40a6c6c..bb2aba7 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -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}"