From 9ec6973cc09b43feae52f5b070d501d942498dfd Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Sun, 20 Jan 2019 23:05:04 +0100 Subject: [PATCH] Fix typo --- src/ext/lib/Settings.js | 12 ++++++------ src/ext/lib/comms/CommsServer.js | 8 ++++---- src/ext/lib/video-transform/Resizer.js | 2 +- src/options/general-settings.vue | 24 ++++++++++++------------ src/popup/js/ExecAction.js | 6 +++--- src/res/popup/js/popup.js | 6 +++--- 6 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/ext/lib/Settings.js b/src/ext/lib/Settings.js index 73c3364..60d993b 100644 --- a/src/ext/lib/Settings.js +++ b/src/ext/lib/Settings.js @@ -334,19 +334,19 @@ class Settings { console.log("[Settings::canStartAutoAr] ----------------\nCAN WE START THIS EXTENSION ON SITE", site, "?\n\nsettings.active.sites[site]=", this.active.sites[site], - "\nExtension mode?", this.active.site['@global'].autoar, + "\nExtension mode?", this.active.sites['@global'].autoar, "\nCan extension be started?", csar ); } // if site is not defined, we use default mode: if (! this.active.sites[site]) { - return this.active.site['@global'].autoar === "blacklist"; + return this.active.sites['@global'].autoar === "blacklist"; } - if (this.active.site['@global'].autoar === "blacklist") { + if (this.active.sites['@global'].autoar === "blacklist") { return this.active.sites[site].arStatus !== "disabled"; - } else if (this.active.site['@global'].autoar === "whitelist") { + } else if (this.active.sites['@global'].autoar === "whitelist") { return this.active.sites[site].arStatus === "enabled"; } else { return false; @@ -368,7 +368,7 @@ class Settings { if (site.stretch) { return site.stretch; } - return this.active.site['@global'].stretch; + return this.active.sites['@global'].stretch; } getDefaultVideoAlignment(site) { @@ -377,7 +377,7 @@ class Settings { if (site.videoAlignment) { return site.videoAlignment; } - return this.active.site['@global'].videoAlignment; + return this.active.sites['@global'].videoAlignment; } } diff --git a/src/ext/lib/comms/CommsServer.js b/src/ext/lib/comms/CommsServer.js index a85d428..51ef6bc 100644 --- a/src/ext/lib/comms/CommsServer.js +++ b/src/ext/lib/comms/CommsServer.js @@ -225,14 +225,14 @@ class CommsServer { } Promise.resolve(ret); } else if (message.cmd === "autoar-enable") { - this.settings.active.site['@global'].autoar = "blacklist"; + this.settings.active.sites['@global'].autoar = "blacklist"; this.settings.save(); this.sendToAll({cmd: "reload-settings", sender: "uwbg"}) if(Debug.debug){ console.log("[uw-bg] autoar set to enabled (blacklist). evidenz:", this.settings.active); } } else if (message.cmd === "autoar-disable") { - this.settings.active.site['@global'].autoar = "disabled"; + this.settings.active.sites['@global'].autoar = "disabled"; if(message.reason){ this.settings.active.arDetect.disabledReason = message.reason; } else { @@ -268,14 +268,14 @@ class CommsServer { sendResponse({extensionConf: JSON.stringify(this.settings.active), site: this.getCurrentTabHostname()}); // return true; } else if (message.cmd === "autoar-enable") { - this.settings.active.site['@global'].autoar = "blacklist"; + this.settings.active.sites['@global'].autoar = "blacklist"; this.settings.save(); this.sendToAll({cmd: "reload-settings", sender: "uwbg"}) if(Debug.debug){ console.log("[uw-bg] autoar set to enabled (blacklist). evidenz:", this.settings.active); } } else if (message.cmd === "autoar-disable") { - this.settings.active.site['@global'].autoar = "disabled"; + this.settings.active.sites['@global'].autoar = "disabled"; if(message.reason){ this.settings.active.arDetect.disabledReason = message.reason; } else { diff --git a/src/ext/lib/video-transform/Resizer.js b/src/ext/lib/video-transform/Resizer.js index ddb2360..24f2af5 100644 --- a/src/ext/lib/video-transform/Resizer.js +++ b/src/ext/lib/video-transform/Resizer.js @@ -323,7 +323,7 @@ class Resizer { computeOffsets(stretchFactors){ if (Debug.debug) { - console.log("[Resizer::_res_computeOffsets] video will be aligned to ", this.settings.active.site['@global'].videoAlignment); + console.log("[Resizer::_res_computeOffsets] video will be aligned to ", this.settings.active.sites['@global'].videoAlignment); } const wdiff = this.conf.player.dimensions.width - this.conf.video.offsetWidth; diff --git a/src/options/general-settings.vue b/src/options/general-settings.vue index 3186d52..d6f8c1e 100644 --- a/src/options/general-settings.vue +++ b/src/options/general-settings.vue @@ -31,15 +31,15 @@
@@ -57,15 +57,15 @@
@@ -75,19 +75,19 @@
@@ -143,7 +143,7 @@ export default { }, methods: { setDefaultAutodetectionMode(mode) { - this.settings.active.site['@global'].autoar = mode; + this.settings.active.sites['@global'].autoar = mode; this.settings.save(); }, setDefaultExtensionMode(mode) { @@ -155,7 +155,7 @@ export default { this.settings.save(); }, setDefaultStretchingMode(mode) { - this.settings.active.site['@global'].stretch = mode; + this.settings.active.sites['@global'].stretch = mode; this.settings.save(); }, updateStretchTreshold(newTreshold) { diff --git a/src/popup/js/ExecAction.js b/src/popup/js/ExecAction.js index 53287af..475b142 100644 --- a/src/popup/js/ExecAction.js +++ b/src/popup/js/ExecAction.js @@ -33,13 +33,13 @@ class ExecAction { this.settings.save(); } else if (scope === 'global') { if (cmd.action === "set-stretch") { - this.settings.active.site['@global'].stretch = cmd.arg; + this.settings.active.sites['@global'].stretch = cmd.arg; } else if (cmd.action === "set-alignment") { - this.settings.active.site['@global'].videoAlignment = cmd.arg; + this.settings.active.sites['@global'].videoAlignment = cmd.arg; } else if (cmd.action === "set-extension-mode") { this.settings.active.sites['@global'] = cmd.arg; } else if (cmd.action === "set-autoar-mode") { - this.settings.active.site['@global'].autoar.arStatus = cmd.arg; + this.settings.active.sites['@global'].autoar.arStatus = cmd.arg; } this.settings.save(); } diff --git a/src/res/popup/js/popup.js b/src/res/popup/js/popup.js index 985c537..6175968 100644 --- a/src/res/popup/js/popup.js +++ b/src/res/popup/js/popup.js @@ -321,11 +321,11 @@ function configureGlobalTab() { processButtonsForPopupCategory(GlobalPanel.elements.stretchSettings, stretchButtons); processButtonsForPopupCategory(GlobalPanel.elements.alignmentSettings, alignButtons); - selectButton('set-stretch', settings.active.site['@global'].stretch, GlobalPanel.elements.stretchSettings.buttons); - selectButton('set-alignment', settings.active.site['@global'].videoAlignment, GlobalPanel.elements.alignmentSettings.buttons); + selectButton('set-stretch', settings.active.sites['@global'].stretch, GlobalPanel.elements.stretchSettings.buttons); + selectButton('set-alignment', settings.active.sites['@global'].videoAlignment, GlobalPanel.elements.alignmentSettings.buttons); selectButton('set-extension-mode', settings.active.sites['@global'], GlobalPanel.elements.extensionSettings.buttons); - selectButton('set-extension-mode', settings.active.site['@global'].autoar, GlobalPanel.elements.autoarSettings.buttons); + selectButton('set-extension-mode', settings.active.sites['@global'].autoar, GlobalPanel.elements.autoarSettings.buttons); } function configureSitesTab(site) {