Fix Australia News Corp (amp-iframe)

master
magnolia1234 2022-08-11 08:32:58 +02:00
parent 9e83f941ec
commit 4e15aa2beb
4 changed files with 12 additions and 16 deletions

View File

@ -4,6 +4,7 @@ Changelog Bypass Paywalls Clean - Chrome
Post-release
Add Aachener Nachrichten & Zeitung
Remove World Politics Review (fix obsolete)
Fix Australia News Corp (amp-iframe)
Fix Limburger.nl & Mediahuis Belgie (mobile)
Fix The New Republic (js)
Fix TheTimes.co.uk (epaper-fix obsolete)

View File

@ -136,19 +136,14 @@ function amp_iframes_replace(weblink = false, source = '') {
width: 'auto',
style: 'border: 0px;'
});
amp_iframe.parentElement.insertBefore(elem, amp_iframe);
removeDOMElement(amp_iframe);
amp_iframe.parentNode.replaceChild(elem, amp_iframe);
} else {
let video_link = document.querySelector('a#bpc_video_link');
if (!video_link) {
amp_iframe.removeAttribute('class');
elem = document.createElement('a');
elem.id = 'bpc_video_link';
elem.innerText = 'Video-link';
elem.setAttribute('href', amp_iframe.getAttribute('src'));
elem.setAttribute('target', '_blank');
amp_iframe.parentElement.insertBefore(elem, amp_iframe);
}
amp_iframe.removeAttribute('class');
elem = document.createElement('a');
elem.innerText = 'Media-link';
elem.setAttribute('href', amp_iframe.getAttribute('src'));
elem.setAttribute('target', '_blank');
amp_iframe.parentNode.replaceChild(elem, amp_iframe);
}
}
}
@ -310,10 +305,10 @@ else {
let amp_ads_sel = 'amp-ad, amp-embed, [id^="ad-mrec-"], .story-ad-container';
let comments;
if (window.location.hostname.startsWith('amp.')) {
amp_unhide_subscr_section(amp_ads_sel, true, true, 'resourcesssl.newscdn.com.au');
amp_unhide_subscr_section(amp_ads_sel, true, true, '.newscdn.com.au');
comments = document.querySelector('#story-comments, .comments-wrapper');
} else if (window.location.search.match(/(\?|&)amp/)) {
amp_unhide_subscr_section(amp_ads_sel, true, true, 'resourcesssl.newscdn.com.au');
amp_unhide_subscr_section(amp_ads_sel, true, true, '.newscdn.com.au');
comments = document.querySelector('#comments-load');
let amp_iframe_sizers = document.querySelectorAll('amp-iframe > i-amphtml-sizer');
removeDOMElement(...amp_iframe_sizers)

View File

@ -43,5 +43,5 @@
"webRequestBlocking",
"<all_urls>"
],
"version": "2.7.9.2"
"version": "2.7.9.3"
}

View File

@ -693,5 +693,5 @@
"*://gcm.omerlocdn.com/*",
"*://webcache.googleusercontent.com/*"
],
"version": "2.7.9.2"
"version": "2.7.9.3"
}