Fix Barron's (timing)

This commit is contained in:
magnolia1234 2021-10-30 10:29:59 +02:00
parent 70832c261c
commit 7bbadfc479
5 changed files with 33 additions and 29 deletions

View File

@ -2,6 +2,7 @@
Changelog Bypass Paywalls Clean - Firefox Changelog Bypass Paywalls Clean - Firefox
Post-release Post-release
Fix Barron's (timing)
Fix Boston Globe (incognito mode) Fix Boston Globe (incognito mode)
Fix Westfaelische Nachrichten & Westfalen-Blatt Fix Westfaelische Nachrichten & Westfalen-Blatt

View File

@ -1611,14 +1611,14 @@ else if (matchDomain('asiatimes.com')) {
} }
else if (matchDomain('barrons.com')) { else if (matchDomain('barrons.com')) {
document.addEventListener('DOMContentLoaded', () => { let url = window.location.href;
if (!url.includes('barrons.com/amp/')) {
let body_continuous = document.querySelector('body.is-continuous'); let body_continuous = document.querySelector('body.is-continuous');
let snippet = document.querySelector('meta[content="snippet"]'); let snippet = document.querySelector('meta[content="snippet"]');
if (body_continuous && snippet) { if (body_continuous && snippet) {
window.location.href = window.location.href.replace('barrons.com', 'barrons.com/amp'); removeDOMElement(snippet);
window.location.href = url.replace('barrons.com', 'barrons.com/amp');
} }
});
if (!window.location.href.includes('barrons.com/amp/')) {
let signin_links = document.querySelectorAll('a.primary-button--link[href*="target="]'); let signin_links = document.querySelectorAll('a.primary-button--link[href*="target="]');
for (let signin_link of signin_links) { for (let signin_link of signin_links) {
signin_link.href = decodeURIComponent(signin_link.href.split('target=')[1]).split('?')[0]; signin_link.href = decodeURIComponent(signin_link.href.split('target=')[1]).split('?')[0];
@ -1632,7 +1632,7 @@ else if (matchDomain('barrons.com')) {
let subscr_section = document.querySelector('section[subscriptions-section="content"]'); let subscr_section = document.querySelector('section[subscriptions-section="content"]');
if (subscr_section) if (subscr_section)
subscr_section.removeAttribute('subscriptions-section'); subscr_section.removeAttribute('subscriptions-section');
let wsj_ads = document.querySelectorAll('.wsj-ad'); let wsj_ads = document.querySelectorAll('.wsj-ad, amp-ad');
removeDOMElement(...wsj_ads); removeDOMElement(...wsj_ads);
} }
} }

View File

@ -1,39 +1,44 @@
{ {
"Aargauerzeitung.ch": { "Aargauerzeitung.ch": {
"allow_cookies": "1", "allow_cookies": 1,
"domain": "aargauerzeitung.ch", "domain": "aargauerzeitung.ch",
"useragent": "googlebot" "useragent": "googlebot"
}, },
"Ara.cat": { "Ara.cat": {
"allow_cookies": "1", "allow_cookies": 1,
"domain": "ara.cat", "domain": "ara.cat",
"useragent": "googlebot" "useragent": "googlebot"
}, },
"Asiasentinel.com": { "Asiasentinel.com": {
"allow_cookies": "1", "allow_cookies": 1,
"domain": "asiasentinel.com", "domain": "asiasentinel.com",
"useragent": "googlebot" "useragent": "googlebot"
}, },
"Beobachter.ch": { "Beobachter.ch": {
"allow_cookies": "1", "allow_cookies": 1,
"domain": "beobachter.ch", "domain": "beobachter.ch",
"useragent": "googlebot" "useragent": "googlebot"
}, },
"Bnn.de": { "Bnn.de": {
"allow_cookies": "1", "allow_cookies": 1,
"domain": "bnn.de", "domain": "bnn.de",
"useragent": "googlebot" "useragent": "googlebot"
}, },
"Capital.bg": { "Capital.bg": {
"allow_cookies": "1", "allow_cookies": 1,
"domain": "capital.bg", "domain": "capital.bg",
"useragent": "googlebot" "useragent": "googlebot"
}, },
"Christianitytoday.com": {
"allow_cookies": 1,
"domain": "christianitytoday.com",
"useragent": "googlebot"
},
"Connexionfrance.com": { "Connexionfrance.com": {
"domain": "connexionfrance.com" "domain": "connexionfrance.com"
}, },
"Handelszeitung.ch": { "Handelszeitung.ch": {
"allow_cookies": "1", "allow_cookies": 1,
"domain": "handelszeitung.ch", "domain": "handelszeitung.ch",
"useragent": "googlebot" "useragent": "googlebot"
}, },
@ -41,36 +46,37 @@
"domain": "heraldscotland.com" "domain": "heraldscotland.com"
}, },
"Internationalepolitik.de": { "Internationalepolitik.de": {
"allow_cookies": "1", "allow_cookies": 1,
"domain": "internationalepolitik.de" "domain": "internationalepolitik.de"
}, },
"Lindipendente.online": { "Lindipendente.online": {
"allow_cookies": "1", "allow_cookies": 1,
"domain": "lindipendente.online", "domain": "lindipendente.online",
"useragent": "googlebot" "useragent": "googlebot"
}, },
"Lsa-conso.fr": { "Lsa-conso.fr": {
"allow_cookies": "1", "allow_cookies": 1,
"domain": "lsa-conso.fr", "domain": "lsa-conso.fr",
"useragent": "googlebot" "useragent": "googlebot"
}, },
"Luzernerzeitung.ch": { "Luzernerzeitung.ch": {
"allow_cookies": "1", "allow_cookies": 1,
"domain": "luzernerzeitung.ch", "domain": "luzernerzeitung.ch",
"useragent": "googlebot" "useragent": "googlebot"
}, },
"Muensterschezeitung.de": { "Muensterschezeitung.de": {
"allow_cookies": "1", "allow_cookies": 1,
"amp_unhide": 1,
"domain": "muensterschezeitung.de", "domain": "muensterschezeitung.de",
"useragent": "googlebot" "useragent": "googlebot"
}, },
"Pressandjournal.co.uk": { "Pressandjournal.co.uk": {
"allow_cookies": "1", "allow_cookies": 1,
"domain": "pressandjournal.co.uk", "domain": "pressandjournal.co.uk",
"useragent": "googlebot" "useragent": "googlebot"
}, },
"Pv-digest.de": { "Pv-digest.de": {
"allow_cookies": "1", "allow_cookies": 1,
"domain": "pv-digest.de", "domain": "pv-digest.de",
"useragent": "googlebot" "useragent": "googlebot"
}, },
@ -78,32 +84,29 @@
"domain": "speld.nl" "domain": "speld.nl"
}, },
"Supchina.com": { "Supchina.com": {
"allow_cookies": "1", "allow_cookies": 1,
"domain": "supchina.com" "domain": "supchina.com"
}, },
"Tagblatt.ch": { "Tagblatt.ch": {
"allow_cookies": "1", "allow_cookies": 1,
"domain": "tagblatt.ch", "domain": "tagblatt.ch",
"useragent": "googlebot" "useragent": "googlebot"
}, },
"The-past.com": { "The-past.com": {
"domain": "the-past.com" "domain": "the-past.com"
}, },
"Themonthly.com.au": {
"domain": "themonthly.com.au"
},
"Tijorifinance.com": { "Tijorifinance.com": {
"allow_cookies": "1", "allow_cookies": 1,
"domain": "tijorifinance.com", "domain": "tijorifinance.com",
"useragent": "googlebot" "useragent": "googlebot"
}, },
"Voguebusiness.com": { "Voguebusiness.com": {
"allow_cookies": "1", "allow_cookies": 1,
"domain": "voguebusiness.com", "domain": "voguebusiness.com",
"useragent": "googlebot" "useragent": "googlebot"
}, },
"Wz.de": { "Wz.de": {
"allow_cookies": "1", "allow_cookies": 1,
"domain": "wz.de", "domain": "wz.de",
"useragent": "googlebot" "useragent": "googlebot"
} }

View File

@ -556,5 +556,5 @@
"*://*.wallkit.net/*", "*://*.wallkit.net/*",
"*://*.wsj.net/*" "*://*.wsj.net/*"
], ],
"version": "2.4.1.4" "version": "2.4.1.5"
} }

View File

@ -109,7 +109,7 @@ function add_options() {
} else { } else {
if (elem.dataset.value) { if (elem.dataset.value) {
if (elem.checked) if (elem.checked)
sites_custom[title][elem.dataset.key] = elem.dataset.value; sites_custom[title][elem.dataset.key] = parseInt(elem.dataset.value);
} else if (elem.value) } else if (elem.value)
sites_custom[title][elem.dataset.key] = elem.value; sites_custom[title][elem.dataset.key] = elem.value;
} }