Version 1.11.0

#336
#340
#342
#339
#334
This commit is contained in:
Kevin Röbert
2020-01-06 16:22:37 +01:00
parent 08fe25dc0d
commit 50542fa6a3
10 changed files with 121 additions and 53 deletions

View File

@@ -114,12 +114,14 @@ function getData()
.then(() => loadData("localHostsSkipping"))
.then(() => loadData("referralMarketing"))
.then(() => loadData("domainBlocking"))
.then(() => loadData("pingBlocking"))
.then(() => {
changeSwitchButton("localHostsSkipping", "localHostsSkipping");
changeSwitchButton("historyListenerEnabled", "historyListenerEnabled");
changeSwitchButton("contextMenuEnabled", "contextMenuEnabled");
changeSwitchButton("referralMarketing", "referralMarketing");
changeSwitchButton("domainBlocking", "domainBlocking");
changeSwitchButton("pingBlocking", "pingBlocking");
});
}
@@ -185,6 +187,8 @@ function setText()
$('#importSettings').prop('title', translate('setting_html_import_button_title'));
injectText("referral_marketing_enabled", "referral_marketing_enabled");
injectText("domain_blocking_enabled", "domain_blocking_enabled");
$('#ping_blocking_enabled').html(translate('ping_blocking_enabled'))
.prop('title', translate('ping_blocking_enabled_title'));
}
/**

View File

@@ -209,11 +209,14 @@ function initSettings() {
storage.referralMarketing = false;
storage.logLimit = -1;
storage.domainBlocking = true;
storage.pingBlocking = true;
if (getBrowser() === "Firefox") {
storage.types = ["font", "image", "imageset", "main_frame", "media", "object", "object_subrequest", "other", "script", "stylesheet", "sub_frame", "websocket", "xbl", "xml_dtd", "xmlhttprequest", "xslt"];
storage.pingRequestTypes = ["ping", "beacon"];
} else if (getBrowser() === "Chrome") {
storage.types = ["main_frame", "sub_frame", "stylesheet", "script", "image", "font", "object", "xmlhttprequest", "ping", "csp_report", "media", "websocket", "other"];
storage.pingRequestTypes = ["ping"];
}
}

View File

@@ -293,7 +293,7 @@ function decodeURL(url) {
return rtn;
}
/*
/**
* Gets the value of at `key` an object. If the resolved value is `undefined`, the `defaultValue` is returned in its place.
*
* @param {string} key the key of the object