Fix Nikkei Asian Review (cookies)

This commit is contained in:
magnolia1234 2021-11-09 17:18:34 +01:00
parent d3f6e3c6f8
commit 659327c4d1
5 changed files with 18 additions and 8 deletions

View file

@ -585,7 +585,7 @@ var block_js = ["*://cdn.tinypass.com/*", "*://*.piano.io/*", "*://*.poool.fr/*"
function disableJavascriptOnListedSites() {
ext_api.webRequest.onBeforeRequest.addListener(function (details) {
let header_referer = details.originUrl ? details.originUrl : details.initiator;
if (!isSiteEnabled(details) || matchUrlDomain(excludedSites, header_referer)) {
if (!isSiteEnabled(details) || matchUrlDomain(excludedSites.concat(['asia.nikkei.com']), header_referer)) {
return;
}
return {
@ -1068,6 +1068,8 @@ function remove_cookies_fn(domainVar, exclusions = false) {
storeId = store.id;
}
storeId = storeId.toString();
if (domainVar === 'asia.nikkei.com')
domainVar = 'nikkei.com';
var cookie_get_options = {
domain: domainVar
};

View file

@ -2,6 +2,7 @@
Changelog Bypass Paywalls Clean - Firefox
Post-release
Fix Nikkei Asian Review (cookies)
* v2.4.3.0 (2021-11-07)
Add Harvard Business Review China

View file

@ -1439,8 +1439,8 @@ else if (matchDomain('spectator.co.uk')) {
}
else if (matchDomain('telegraph.co.uk')) {
let url = window.location.href;
if (new URL(url).pathname.endsWith('/amp/')) {
let url = window.location.href.split('?')[0];
if (url.endsWith('/amp/')) {
let paywall = document.querySelector('.premium-paywall');
if (paywall) {
let truncated_content = document.querySelector('.truncated-content');
@ -1449,6 +1449,11 @@ else if (matchDomain('telegraph.co.uk')) {
if (subscr_section)
subscr_section.removeAttribute('amp-access-hide');
}
let amp_ads = document.querySelectorAll('amp-ad, amp-embed');
removeDOMElement(...amp_ads);
} else {
let ads = document.querySelectorAll('.advert, .commercial-unit');
removeDOMElement(...ads);
}
}
@ -1613,7 +1618,7 @@ else if (matchDomain('americanaffairsjournal.org')) {
}
else if (matchDomain('asia.nikkei.com')) {
let popup = document.querySelector('.pw-widget--popup');
let popup = document.querySelector('#pianoj_ribbon');
removeDOMElement(popup);
}
@ -2257,8 +2262,9 @@ else if (matchDomain('newstatesman.com')) {
}
else if (matchDomain('newrepublic.com')) {
let pw_opups = document.querySelector('div#pwPopups');
removeDOMElement(pw_opups);
let pw_popups = document.querySelector('div#pwPopups');
let ads = document.querySelectorAll('.ad-unit, .ad-container');
removeDOMElement(pw_popups, ...ads);
}
else if (matchDomain('newyorker.com') && window.location.href.split('?')[0].match(/\.com\/.+\//) ) {

View file

@ -558,5 +558,5 @@
"*://*.wallkit.net/*",
"*://*.wsj.net/*"
],
"version": "2.4.3.0"
"version": "2.4.3.1"
}

View file

@ -1032,7 +1032,8 @@ var defaultSites = {
referer: "facebook"
},
"Nikkei Asian Review": {
domain: "asia.nikkei.com"
domain: "asia.nikkei.com",
remove_cookies_select_drop: ["xbc"]
},
"NK News (free articles only)": {
domain: "nknews.org",