mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-10 01:11:04 +00:00
Fix Business Standard & DN.no (images)
This commit is contained in:
parent
fdc6308d39
commit
3bc281ea59
@ -2,6 +2,8 @@
|
|||||||
Changelog Bypass Paywalls Clean - Firefox
|
Changelog Bypass Paywalls Clean - Firefox
|
||||||
|
|
||||||
Post-release
|
Post-release
|
||||||
|
Fix Business Standard (images)
|
||||||
|
Fix DN.no (images)
|
||||||
Fix The Athletic (regwall)
|
Fix The Athletic (regwall)
|
||||||
|
|
||||||
* v2.9.6.0 (2022-12-04)
|
* v2.9.6.0 (2022-12-04)
|
||||||
|
@ -2758,6 +2758,15 @@ else if (matchDomain('business-standard.com')) {
|
|||||||
removeDOMElement(...ads);
|
removeDOMElement(...ads);
|
||||||
} else {
|
} else {
|
||||||
amp_unhide_subscr_section('amp-ad, amp-embed, .block-cont-amp, #divnonpaidcontent, section > div.article_image, div[subscriptions-actions], .reader');
|
amp_unhide_subscr_section('amp-ad, amp-embed, .block-cont-amp, #divnonpaidcontent, section > div.article_image, div[subscriptions-actions], .reader');
|
||||||
|
let hidden_images = document.querySelectorAll('p > amp-img[src][width]');
|
||||||
|
for (let elem of hidden_images) {
|
||||||
|
let img = document.createElement('img');
|
||||||
|
img.src = elem.getAttribute('src');
|
||||||
|
elem.parentNode.replaceChild(img, elem);
|
||||||
|
}
|
||||||
|
let author_image = document.querySelector('amp-img > img[src*="/bs/img/author/"]');
|
||||||
|
if (author_image)
|
||||||
|
author_image.removeAttribute('class');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2872,14 +2881,13 @@ else if (matchDomain('dn.no')) {
|
|||||||
let paywall = document.querySelector('div#dn-ncp-popup, div.paywall, iframe[title="Paywall"]');
|
let paywall = document.querySelector('div#dn-ncp-popup, div.paywall, iframe[title="Paywall"]');
|
||||||
if (paywall) {
|
if (paywall) {
|
||||||
removeDOMElement(paywall);
|
removeDOMElement(paywall);
|
||||||
csDoneOnce = true;
|
let article_sel = 'article';
|
||||||
let article_sel = 'section.article-main-content';
|
|
||||||
let article = document.querySelector(article_sel);
|
let article = document.querySelector(article_sel);
|
||||||
if (article) {
|
if (article) {
|
||||||
let url_cache = 'https://webcache.googleusercontent.com/search?q=cache:' + url.split('?')[0];
|
let url_cache = 'https://webcache.googleusercontent.com/search?q=cache:' + url.split('?')[0];
|
||||||
replaceDomElementExt(url_cache, true, false, article_sel);
|
replaceDomElementExt(url_cache, true, false, article_sel);
|
||||||
} else {
|
} else {
|
||||||
article = document.querySelector('article, main#main-story, main.lp_article_content');
|
article = document.querySelector('main#main-story, main.lp_article_content');
|
||||||
if (article)
|
if (article)
|
||||||
article.insertBefore(googleWebcacheLink(url), article.firstChild);
|
article.insertBefore(googleWebcacheLink(url), article.firstChild);
|
||||||
}
|
}
|
||||||
@ -2891,6 +2899,14 @@ else if (matchDomain('dn.no')) {
|
|||||||
let infobox_content = document.querySelector('div.infobox__content');
|
let infobox_content = document.querySelector('div.infobox__content');
|
||||||
if (infobox_content)
|
if (infobox_content)
|
||||||
infobox_content.removeAttribute('class');
|
infobox_content.removeAttribute('class');
|
||||||
|
let lazy_images = document.querySelectorAll('img[class*="lazy"][data-srcset]:not([src])');
|
||||||
|
for (let elem of lazy_images) {
|
||||||
|
elem.src = elem.getAttribute('data-srcset').split(' ')[0];
|
||||||
|
if (elem.classList.contains('lazy'))
|
||||||
|
elem.classList.remove('lazy');
|
||||||
|
else
|
||||||
|
elem.removeAttribute('class');
|
||||||
|
}
|
||||||
let ads = document.querySelectorAll('div[id^="googlead-"]');
|
let ads = document.querySelectorAll('div[id^="googlead-"]');
|
||||||
removeDOMElement(...ads);
|
removeDOMElement(...ads);
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
@ -732,5 +732,5 @@
|
|||||||
"*://gcm.omerlocdn.com/*",
|
"*://gcm.omerlocdn.com/*",
|
||||||
"*://webcache.googleusercontent.com/*"
|
"*://webcache.googleusercontent.com/*"
|
||||||
],
|
],
|
||||||
"version": "2.9.6.1"
|
"version": "2.9.6.2"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user