Force override existing settings for 4.0

This commit is contained in:
Tamius Han 2019-06-03 00:37:19 +02:00
parent 8231174f57
commit 65e41e575d
2 changed files with 11 additions and 9 deletions

View File

@ -6,6 +6,8 @@ import ObjectCopy from '../lib/ObjectCopy';
import Stretch from '../../common/enums/stretch.enum';
import VideoAlignment from '../../common/enums/video-alignment.enum';
class Settings {
constructor(activeSettings, updateCallback) {
@ -103,16 +105,16 @@ class Settings {
// if extension has been updated, update existing settings with any options added in the
// new version. In addition to that, we remove old keys that are no longer used.
const patched = ObjectCopy.addNew(settings, this.default);
if(Debug.debug) {
console.log("[Settings.init] Results from ObjectCopy.addNew()?", patched, "\n\nSettings from storage", settings, "\ndefault?", this.default,);
}
// const patched = ObjectCopy.addNew(settings, this.default);
// if(Debug.debug) {
// console.log("[Settings.init] Results from ObjectCopy.addNew()?", patched, "\n\nSettings from storage", settings, "\ndefault?", this.default,);
// }
if(patched){
this.active = patched;
} else {
// if(patched){
// this.active = patched;
// } else {
this.active = JSON.parse(JSON.stringify(this.default));
}
// }
this.set(this.active);
return this.active;

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.0a2",
"version": "4.0.0",
"applications": {
"gecko": {
"id": "{cf02b1a7-a01a-4e37-a609-516a283f1ed3}"