From 2bfa3e8dfcc24e3b7d8f63569cb6cf41652aad0e Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Fri, 7 Jun 2019 01:50:13 +0200 Subject: [PATCH] Site settings: allow user to select a site --- src/ext/conf/ExtensionConf.js | 20 +++++++++++ src/ext/lib/video-transform/Resizer.js | 4 +-- src/popup/App.vue | 49 +++++++++++++++++++++++--- 3 files changed, 67 insertions(+), 6 deletions(-) diff --git a/src/ext/conf/ExtensionConf.js b/src/ext/conf/ExtensionConf.js index 76c0802..291d5d1 100644 --- a/src/ext/conf/ExtensionConf.js +++ b/src/ext/conf/ExtensionConf.js @@ -919,6 +919,26 @@ var ExtensionConf = { } } }, + "old.reddit.com" : { + mode: ExtensionMode.Enabled, + autoar: currentBrowser.firefox ? ExtensionMode.Enabled : ExtensionMode.Disabled, + override: false, + type: 'official', + 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/video-transform/Resizer.js b/src/ext/lib/video-transform/Resizer.js index 8fecf5f..f5cba16 100644 --- a/src/ext/lib/video-transform/Resizer.js +++ b/src/ext/lib/video-transform/Resizer.js @@ -511,7 +511,7 @@ class Resizer { } } - if(Debug.debug) { + // if(Debug.debug) { console.log("[Resizer::_res_computeOffsets] calculated offsets:\n\n", '---- data in ----\n', 'player dimensions:', {w: this.conf.player.dimensions.width, h: this.conf.player.dimensions.height}, @@ -520,7 +520,7 @@ class Resizer { 'pan & zoom: ', this.pan, this.zoom, '\n\n---- data out ----\n', 'translate:', translate); - } + // } return translate; } diff --git a/src/popup/App.vue b/src/popup/App.vue index 8f8d4e5..3e19d41 100644 --- a/src/popup/App.vue +++ b/src/popup/App.vue @@ -24,7 +24,20 @@
Site settings
-
+
+ Select site to control: +
+
+ {{site.host}} +
+