Add Discover Magazine

This commit is contained in:
magnolia1234 2020-06-14 18:09:59 +02:00
parent 2a858d9c14
commit 6e12ce527f
4 changed files with 12 additions and 0 deletions

View File

@ -55,6 +55,7 @@ Install add-on by downloading xpi-file.
##### Tech/Science
[Chemical & Engineering News](https://cen.acs.org) -
[Dark Reading](https://www.darkreading.com) -
[Discover Magazine](https://www.discovermagazine.com) -
[MIT Technology Review](https://www.technologyreview.com) -
[Towards Data Science](https://www.towardsdatascience.com) -
[Wired](https://www.wired.com) -

View File

@ -381,6 +381,15 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) {
});
}
// remove cookies Discover Magazine
if (matchUrlDomain('ctfassets.net', details.url) && matchUrlDomain('discovermagazine.com', header_referer)) {
ext_api.cookies.getAll({domain: 'discovermagazine.com'}, function(cookies) {
for (let cookie of cookies) {
ext_api.cookies.remove({url: (cookie.secure ? "https://" : "http://") + cookie.domain + cookie.path, name: cookie.name});
}
});
}
// block external javascript for custom sites (optional)
var domain_blockjs_ext = matchUrlDomain([block_js_custom_ext], header_referer);
if (domain_blockjs_ext && !matchUrlDomain(domain_blockjs_ext, details.url) && details.url.match(/(\.js$|\.js\?)/) && isSiteEnabled({url: header_referer})) {

View File

@ -234,6 +234,7 @@
"*://*.ampproject.org/*",
"*://*.cedsdigital.it/*",
"*://*.corriereobjects.it/*",
"*://*.ctfassets.net/*",
"*://*.emol.cl/*",
"*://*.epimg.net/*",
"*://*.flip-pay.com/*",

View File

@ -30,6 +30,7 @@ var defaultSites =
"De Tijd": "tijd.be",
"DeMorgen": "demorgen.be",
"Digiday": "digiday.com",
"Discover Magazine": "discovermagazine.com",
"El Comercio": "elcomercio.pe",
"El Mercurio": "elmercurio.com",
"El Mundo": "elmundo.es",