From 5ce0c510184f7dff1dae5428b61221f6abc5a039 Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Mon, 16 Jul 2018 20:38:16 +0200 Subject: [PATCH] Fixed autodetection menu --- js/conf/Debug.js | 4 ++-- manifest.json | 2 +- res/popup/js/popup.js | 23 +---------------------- 3 files changed, 4 insertions(+), 25 deletions(-) diff --git a/js/conf/Debug.js b/js/conf/Debug.js index 28d7ecf..1c1d516 100644 --- a/js/conf/Debug.js +++ b/js/conf/Debug.js @@ -1,6 +1,6 @@ // Set prod to true when releasing -_prod = true; -// _prod = false; +// _prod = true; +_prod = false; Debug = { debug: true, diff --git a/manifest.json b/manifest.json index e939a14..c259a0c 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "Ultrawidify", - "version": "3.0.0", + "version": "3.0.1", "icons": { "32":"res/icons/uw-32.png", diff --git a/res/popup/js/popup.js b/res/popup/js/popup.js index 6625f40..c496361 100644 --- a/res/popup/js/popup.js +++ b/res/popup/js/popup.js @@ -376,21 +376,10 @@ function toggleSite(option){ Comms.sendToBackgroundScript({cmd:"enable-for-site", option:option}); } -function getMode(isEnabled, whitelistOnly) { - if(isEnabled) { - return whitelistOnly ? "whitelist" : "blacklist" - } else { - return "disabled"; - } -} - - document.addEventListener("click", (e) => { function getcmd(e){ - - var command = {}; command.sender = "popup"; command.receiver = "uwbg"; @@ -533,9 +522,7 @@ document.addEventListener("click", (e) => { return command; } if(e.target.classList.contains("_autoAr")){ - - var command = {}; - if(e.target.classList.contains("_ext_global_options")){ + if(e.target.classList.contains("_ar_global_options")){ command.cmd = "set-autoar-defaults"; if (e.target.classList.contains("_blacklist")) { command.mode = "blacklist"; @@ -546,14 +533,6 @@ document.addEventListener("click", (e) => { } return command; } else if (e.target.classList.contains("_autoAr_whitelist-only")) { - var arStatus = document.getElementById("_checkbox_autoar-enabled").checked; - var whitelist = document.getElementById("_checkbox_autoar-whitelist").checked; - - - if(Debug.debug) { - console.log("CHANGED CHECKMARK IN _AR-WHTIELIST:", extStatus, whitelist) - } - return { cmd: "set-autoar-mode", mode: getMode(arStatus, whitelist),