Fix The Athletic (timing)

This commit is contained in:
magnolia1234 2023-06-24 08:02:53 +02:00
parent e27d5c533a
commit b4ea5cb260
2 changed files with 5 additions and 12 deletions

View file

@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Firefox
Updates (install signed xpi-file): https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/releases
Post-release
Fix The Athletic (timing)
* v3.2.1.0 (2023-06-05)
Add Boersen-zeitung.de

View file

@ -4295,9 +4295,8 @@ else if (matchDomain('the-american-interest.com')) {
else if (matchDomain('theathletic.com')) {
if (!(window.location.search.match(/(\?|&)amp/) && !document.querySelector('link[rel="amphtml"]'))) {
let paywall = document.querySelector('div[id^="slideup-"]');
if (paywall) {
removeDOMElement(paywall);
function theathletic_func(node) {
removeDOMElement(node);
let overlays = document.querySelectorAll('div[id*="overlay"], div:empty:not([data-rjs])');
hideDOMElement(...overlays);
let body = document.querySelector('body');
@ -4305,16 +4304,9 @@ else if (matchDomain('theathletic.com')) {
body.style.overflow = 'visible';
body.style.position = 'relative';
}
} else {
let headline_paywall = document.querySelectorAll('a.headline-paywall');
let amphtml = document.querySelector('link[rel="amphtml"]');
if (headline_paywall.length && amphtml) {
removeDOMElement(...headline_paywall);
window.setTimeout(function () {
window.location.href = amphtml.href;
}, 1000);
}
}
waitDOMElement('div[id^="slideup-"]', 'DIV', theathletic_func);
csDoneOnce = true;
} else {
amp_unhide_subscr_section();
amp_unhide_access_hide('', '*="NOT granted"');