Fixed autodetection menu
This commit is contained in:
parent
d48d1d3e96
commit
5ce0c51018
@ -1,6 +1,6 @@
|
|||||||
// Set prod to true when releasing
|
// Set prod to true when releasing
|
||||||
_prod = true;
|
// _prod = true;
|
||||||
// _prod = false;
|
_prod = false;
|
||||||
|
|
||||||
Debug = {
|
Debug = {
|
||||||
debug: true,
|
debug: true,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "Ultrawidify",
|
"name": "Ultrawidify",
|
||||||
"version": "3.0.0",
|
"version": "3.0.1",
|
||||||
|
|
||||||
"icons": {
|
"icons": {
|
||||||
"32":"res/icons/uw-32.png",
|
"32":"res/icons/uw-32.png",
|
||||||
|
@ -376,21 +376,10 @@ function toggleSite(option){
|
|||||||
Comms.sendToBackgroundScript({cmd:"enable-for-site", option: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) => {
|
document.addEventListener("click", (e) => {
|
||||||
|
|
||||||
|
|
||||||
function getcmd(e){
|
function getcmd(e){
|
||||||
|
|
||||||
|
|
||||||
var command = {};
|
var command = {};
|
||||||
command.sender = "popup";
|
command.sender = "popup";
|
||||||
command.receiver = "uwbg";
|
command.receiver = "uwbg";
|
||||||
@ -533,9 +522,7 @@ document.addEventListener("click", (e) => {
|
|||||||
return command;
|
return command;
|
||||||
}
|
}
|
||||||
if(e.target.classList.contains("_autoAr")){
|
if(e.target.classList.contains("_autoAr")){
|
||||||
|
if(e.target.classList.contains("_ar_global_options")){
|
||||||
var command = {};
|
|
||||||
if(e.target.classList.contains("_ext_global_options")){
|
|
||||||
command.cmd = "set-autoar-defaults";
|
command.cmd = "set-autoar-defaults";
|
||||||
if (e.target.classList.contains("_blacklist")) {
|
if (e.target.classList.contains("_blacklist")) {
|
||||||
command.mode = "blacklist";
|
command.mode = "blacklist";
|
||||||
@ -546,14 +533,6 @@ document.addEventListener("click", (e) => {
|
|||||||
}
|
}
|
||||||
return command;
|
return command;
|
||||||
} else if (e.target.classList.contains("_autoAr_whitelist-only")) {
|
} 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 {
|
return {
|
||||||
cmd: "set-autoar-mode",
|
cmd: "set-autoar-mode",
|
||||||
mode: getMode(arStatus, whitelist),
|
mode: getMode(arStatus, whitelist),
|
||||||
|
Loading…
Reference in New Issue
Block a user