Force override existing settings for 4.0
This commit is contained in:
parent
8231174f57
commit
65e41e575d
@ -6,6 +6,8 @@ import ObjectCopy from '../lib/ObjectCopy';
|
|||||||
import Stretch from '../../common/enums/stretch.enum';
|
import Stretch from '../../common/enums/stretch.enum';
|
||||||
import VideoAlignment from '../../common/enums/video-alignment.enum';
|
import VideoAlignment from '../../common/enums/video-alignment.enum';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Settings {
|
class Settings {
|
||||||
|
|
||||||
constructor(activeSettings, updateCallback) {
|
constructor(activeSettings, updateCallback) {
|
||||||
@ -103,16 +105,16 @@ class Settings {
|
|||||||
|
|
||||||
// if extension has been updated, update existing settings with any options added in the
|
// 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.
|
// new version. In addition to that, we remove old keys that are no longer used.
|
||||||
const patched = ObjectCopy.addNew(settings, this.default);
|
// const patched = ObjectCopy.addNew(settings, this.default);
|
||||||
if(Debug.debug) {
|
// if(Debug.debug) {
|
||||||
console.log("[Settings.init] Results from ObjectCopy.addNew()?", patched, "\n\nSettings from storage", settings, "\ndefault?", this.default,);
|
// console.log("[Settings.init] Results from ObjectCopy.addNew()?", patched, "\n\nSettings from storage", settings, "\ndefault?", this.default,);
|
||||||
}
|
// }
|
||||||
|
|
||||||
if(patched){
|
// if(patched){
|
||||||
this.active = patched;
|
// this.active = patched;
|
||||||
} else {
|
// } else {
|
||||||
this.active = JSON.parse(JSON.stringify(this.default));
|
this.active = JSON.parse(JSON.stringify(this.default));
|
||||||
}
|
// }
|
||||||
|
|
||||||
this.set(this.active);
|
this.set(this.active);
|
||||||
return this.active;
|
return this.active;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "Ultrawidify",
|
"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.",
|
"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": {
|
"applications": {
|
||||||
"gecko": {
|
"gecko": {
|
||||||
"id": "{cf02b1a7-a01a-4e37-a609-516a283f1ed3}"
|
"id": "{cf02b1a7-a01a-4e37-a609-516a283f1ed3}"
|
||||||
|
Loading…
Reference in New Issue
Block a user