diff --git a/src/common/components/QuerySelectorSetting.vue b/src/common/components/QuerySelectorSetting.vue new file mode 100644 index 0000000..3f67375 --- /dev/null +++ b/src/common/components/QuerySelectorSetting.vue @@ -0,0 +1,87 @@ + + + + + + + diff --git a/src/ext/conf/Debug.js b/src/ext/conf/Debug.js index b047a89..e91e20a 100644 --- a/src/ext/conf/Debug.js +++ b/src/ext/conf/Debug.js @@ -1,18 +1,18 @@ // Set prod to true when releasing -const _prod = true; -// const _prod = false; +// const _prod = true; +const _prod = false; var Debug = { // performanceMetrics: true, // should not be affected by debug.debug in order to allow benchmarking of the impact logging in console has // init: true, - // debug: true, + debug: true, // debug: false, // keyboard: true, // debugResizer: true, // debugArDetect: true, // scaler: true, // debugStorage: false, - // debugStorage: true, + debugStorage: true, // comms: false, // comms: true, // showArDetectCanvas: true, diff --git a/src/ext/conf/ExtensionConf.js b/src/ext/conf/ExtensionConf.js index 291d5d1..ab10aaa 100644 --- a/src/ext/conf/ExtensionConf.js +++ b/src/ext/conf/ExtensionConf.js @@ -927,17 +927,7 @@ var ExtensionConf = { stretch: Stretch.Default, videoAlignment: VideoAlignment.Default, keyboardShortcutsEnabled: ExtensionMode.Default, - // videoElement: { // extra stuff for video tag - // querySelectors: [], // array of strings with css selectors - // userCss: [], // additional styles that user can define for video element - // }, - playerElement: { - // querySelectors: [], // array of strings with css selectors - videoAncestor: 1, // if not falsey, the number represents how far up the DOM (in nodes) - // from video the player lies. Can also be object (valid properties are - // 'fullscreen', 'embed' and 'normal') - userCss: [], - } + }, } } diff --git a/src/ext/lib/Settings.js b/src/ext/lib/Settings.js index b6e6634..57fff06 100644 --- a/src/ext/lib/Settings.js +++ b/src/ext/lib/Settings.js @@ -143,6 +143,14 @@ class Settings { }); } + if (Debug.debug && Debug.debugStorage) { + try { + console.log("[Settings::get] Got settings:", JSON.parse(ret.uwSettings)); + } catch (e) { + console.log("[Settings::get] No settings.") + } + } + try { return JSON.parse(ret.uwSettings); } catch(e) { @@ -151,7 +159,7 @@ class Settings { } async set(extensionConf) { - if (Debug.debug) { + if (Debug.debug && Debug.debugStorage) { console.log("[Settings::set] setting new settings:", extensionConf) } @@ -172,7 +180,7 @@ class Settings { } async save() { - if (Debug.debug) { + if (Debug.debug && Debug.storage) { console.log("[Settings::save] Saving active settings:", this.active); } diff --git a/src/popup/App.vue b/src/popup/App.vue index 3e19d41..5c1764b 100644 --- a/src/popup/App.vue +++ b/src/popup/App.vue @@ -24,7 +24,7 @@