Fix Augsburger Allgemeine

This commit is contained in:
magnolia1234 2021-06-28 08:51:33 +02:00
parent 5988b0acd2
commit 62221c780a
3 changed files with 22 additions and 2 deletions

View File

@ -2,6 +2,7 @@
Changelog Bypass Paywalls Clean - Firefox
Post-release
Fix Augsburger Allgemeine
* v2.2.7.0 (2021-06-27)
Fix National Geographic USA

View File

@ -248,10 +248,29 @@ else {
if (matchDomain('augsburger-allgemeine.de')) {
let url = window.location.href;
if (url.includes('-amp.html')) {
if (!url.includes('-amp.html')) {
let paywall = document.querySelector('div.aa-visible-logged-out');
if (paywall) {
removeDOMElement(paywall);
window.location.href = url.replace('.html', '-amp.html');
}
} else {
let subscr_sections = document.querySelectorAll('div[subscriptions-section="content"]');
for (let subscr_section of subscr_sections)
subscr_section.removeAttribute('subscriptions-section');
let amp_iframes = document.querySelectorAll('amp-iframe');
let elem;
for (let amp_iframe of amp_iframes) {
elem = document.createElement('iframe');
elem.src = amp_iframe.getAttribute('src');
elem.setAttribute('frameborder', '0');
if (amp_iframe.getAttribute('height') && amp_iframe.getAttribute('width')) {
elem.setAttribute('height') = amp_iframe.getAttribute('height');
elem.setAttribute('width') = amp_iframe.getAttribute('width');
}
amp_iframe.parentElement.insertBefore(elem, amp_iframe);
removeDOMElement(amp_iframe);
}
let amp_ads = document.querySelectorAll('amp-ad');
removeDOMElement(...amp_ads);
}

View File

@ -528,5 +528,5 @@
"*://*.wallkit.net/*",
"*://*.wsj.net/*"
],
"version": "2.2.7.0"
"version": "2.2.7.1"
}