Fix Independent.co.uk (premium images)

Fix Zeit.de
This commit is contained in:
magnolia1234 2024-01-15 18:46:33 +01:00
parent 6d63d584c4
commit db22ed98b7
8 changed files with 77 additions and 57 deletions

View file

@ -3,10 +3,12 @@ Changelog Bypass Paywalls Clean - Firefox
Updates (install signed xpi-file): https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/releases
Post-release
Fix Independent.co.uk (premium images)
Fix Zeit.de (bug; update rules)
* v3.5.1.0 (2024-01-14)
Add Boston Herald (MediaNews Group)
Add EWmagazine.nl (link to archive.is)
Add EWmagazine.nl (fetch from archive.is)
Add Schwarzwaelder-bote.de
Add The Irish Examiner
Remove LeMonde.fr (fix obsolete)

View file

@ -2,6 +2,7 @@
var ext_api = (typeof browser === 'object') ? browser : chrome;
var mobile = window.navigator.userAgent.toLowerCase().includes('mobile');
var domain;
var func_post;
var csDone;
var csDoneOnce;
var dompurify_loaded = (typeof DOMPurify === 'function');
@ -929,7 +930,7 @@ else if (matchDomain('faz.net')) {
else if (matchDomain('freiepresse.de')) {
if (window.location.pathname.includes('-artikel')) {
let url = window.location.href;
let func_post = function () {
func_post = function () {
let lazy_images = document.querySelectorAll('picture.lazy');
for (let elem of lazy_images) {
elem.removeAttribute('class');
@ -941,7 +942,7 @@ else if (matchDomain('freiepresse.de')) {
}
}
}
getGoogleWebcache(url, 'div.article-teaser', '', 'article', func_post);
getGoogleWebcache(url, 'div.article-teaser', '', 'article');
}
}
@ -1239,17 +1240,18 @@ else if (matchDomain(['stuttgarter-nachrichten.de', 'stuttgarter-zeitung.de', 's
}
else if (matchDomain('sueddeutsche.de')) {
let clear_ads = function () {
let ads = document.querySelectorAll('div.ad-container, er-ad-slot');
hideDOMElement(...ads);
}
func_post = clear_ads;
let url = window.location.href;
let paywall;
if (window.location.pathname.startsWith('/projekte/artikel/')) {
getArchive(url, 'div.offer-page', '', 'main');
} else {
getArchive(url, 'p.sz-article-body__paragraph--reduced', {rm_attrib: 'class'}, 'div[itemprop="articleBody"]');
}
window.setTimeout(function () {
let ads = document.querySelectorAll('div.ad-container, er-ad-slot');
hideDOMElement(...ads);
}, 3000);
clear_ads();
}
else if (matchDomain('tagesspiegel.de')) {
@ -1354,11 +1356,9 @@ else if (matchDomain('weser-kurier.de')) {
else if (matchDomain('zeit.de')) {
let url = window.location.href.split(/[#\?]/)[0];
if (url.match(/\.de\/\d{4}\//)) {
if (document.querySelector('head > link[rel="next"]'))
url += '/komplettansicht';
getArchive(url, 'aside#paywall', '', 'article');
}
if (document.querySelector('head > link[rel="next"]'))
url += '/komplettansicht';
getArchive(url, 'aside#paywall', '', 'article');
}
else if (matchDomain(de_lv_domains)) {
@ -1680,7 +1680,7 @@ else if (matchDomain(fr_be_groupe_rossel)) {
let ads = document.querySelectorAll('div[id^="article_"], r-pub, div#rossel-leader-top');
hideDOMElement(...ads);
}
let func_post = function () {
func_post = function () {
let videos = document.querySelectorAll('r-embed');
for (let video of videos) {
let source = video.querySelector('div[data-src]');
@ -1697,7 +1697,7 @@ else if (matchDomain(fr_be_groupe_rossel)) {
}
clear_ads();
}
getArchive(url, 'r-panel.r-paywall--header, r-panel.r-panel--paywall', '', 'article, r-main', func_post);
getArchive(url, 'r-panel.r-paywall--header, r-panel.r-panel--paywall', '', 'article, r-main');
clear_ads();
}
@ -2494,7 +2494,7 @@ else if (matchDomain(['lc.nl', 'dvhn.nl']) || document.querySelector('head > lin
else if (matchDomain(nl_dpg_adr_domains)) {
let url = window.location.href;
getArchive(url, 'div#remaining-paid-content[data-reduced="true"]', '', 'div.article__body', '', '', 'div#remaining-paid-content');
getArchive(url, 'div#remaining-paid-content[data-reduced="true"]', '', 'div.article__body', '', 'div#remaining-paid-content');
}
else if (matchDomain(nl_dpg_media_domains)) {
@ -2752,14 +2752,14 @@ else if (matchDomain('businesspost.ie')) {
else if (matchDomain('citywire.com')) {
let url = window.location.href;
let func_post = function () {
func_post = function () {
let banners = document.querySelectorAll('div#lockedLoginPanel, div#lockedContentPlaceholder');
removeDOMElement(...banners);
let article = document.querySelector('div.cw-article-body');
if (article)
removeDOMElement(article.nextSibling);
}
getGoogleWebcache(url, 'div.locked-content.cw-article-body', {rm_class: 'locked-content'}, 'div.cw-article-body', func_post);
getGoogleWebcache(url, 'div.locked-content.cw-article-body', {rm_class: 'locked-content'}, 'div.cw-article-body');
}
else if (matchDomain('fnlondon.com')) {
@ -2783,6 +2783,13 @@ else if (matchDomain('granta.com')) {
}
else if (matchDomain('independent.co.uk')) {
func_post = function () {
let lazy_images = document.querySelectorAll('img[loading="lazy"][width]');
for (let elem of lazy_images) {
elem.removeAttribute('width');
elem.style = 'width: 100%;';
}
}
let url = window.location.href;
if (window.location.search.match(/(\?|&)amp/)) {
let ads = document.querySelectorAll('amp-ad, amp-embed, [id^="ad-"]');
@ -2983,15 +2990,13 @@ else if (matchDomain('theneweuropean.co.uk')) {
else if (matchDomain('thetimes.co.uk')) {
let url = window.location.href;
if (window.location.hostname !== 'epaper.thetimes.co.uk') {
let func_post = function () {
window.setTimeout(function () {
let headings = document.querySelectorAll('div > div[role="heading"]');
for (let elem of headings)
elem.parentNode.style['margin-top'] = '50px';
let image_boxes = document.querySelectorAll('div[id*="."][style]');
for (let elem of image_boxes)
elem.style['margin-bottom'] = '50px';
}, 1500);
func_post = function () {
let headings = document.querySelectorAll('div > div[role="heading"]');
for (let elem of headings)
elem.parentNode.style['margin-top'] = '50px';
let image_boxes = document.querySelectorAll('div[id*="."][style]');
for (let elem of image_boxes)
elem.style['margin-bottom'] = '50px';
for (let n = 0; n < 5; n++) {
window.setTimeout(function () {
let page_scroll = document.querySelectorAll('html, body');
@ -3001,7 +3006,7 @@ else if (matchDomain('thetimes.co.uk')) {
}
}
if (!url.includes('?shareToken=')) {
getArchive(url, 'div#paywall-portal-article-footer', '', 'article#article-main', func_post);
getArchive(url, 'div#paywall-portal-article-footer', '', 'article#article-main');
}
let paywall_page = document.querySelector('div#paywall-portal-page-footer');
let block = document.querySelector('.subscription-block');
@ -3598,12 +3603,12 @@ else if (matchDomain('cnbc.com')) {
else if (matchDomain('columbian.com')) {
let url = window.location.href;
let func_post = function () {
func_post = function () {
let modal = document.querySelector('div.modal');
let fade = document.querySelector('div[style*="background-image: linear-gradient"]');
removeDOMElement(modal, fade);
}
getGoogleWebcache(url, 'div#inline-paywall', '', 'div[itemprop="articleBody"]', func_post);
getGoogleWebcache(url, 'div#inline-paywall', '', 'div[itemprop="articleBody"]');
}
else if (matchDomain('csmonitor.com')) {
@ -3857,7 +3862,7 @@ else if (matchDomain('ftm.eu')) {
else if (matchDomain(['haaretz.co.il', 'haaretz.com', 'themarker.com'])) {
if (window.location.pathname.includes('/.')) {
let func_post = function () {
func_post = function () {
let article_link = document.querySelector('article header');
if (article_link) {
let article_new = document.querySelector(article_sel);
@ -3871,7 +3876,7 @@ else if (matchDomain(['haaretz.co.il', 'haaretz.com', 'themarker.com'])) {
let url = window.location.href;
let paywall_sel = 'div[data-test="paywallMidpage"]';
let article_sel = 'div[data-test="articleBody"]';
getArchive(url, paywall_sel, '', article_sel, func_post);
getArchive(url, paywall_sel, '', article_sel);
} else
csDoneOnce = true;
}
@ -4289,8 +4294,12 @@ else if (matchDomain('newrepublic.com')) {
}
else if (matchDomain('newscientist.com')) {
let clear_ads = function() {
let ads = document.querySelectorAll('div[class*="Advert"]');
hideDOMElement(...ads);
}
let url = window.location.href;
let func_post = function () {
func_post = function () {
let lazy_images = document.querySelectorAll('img.lazyload[data-src]:not([src])');
for (let elem of lazy_images)
elem.src = elem.getAttribute('data-src').split('?')[0] + '?width=800';
@ -4306,12 +4315,10 @@ else if (matchDomain('newscientist.com')) {
removeDOMElement(break_post);
}
}
clear_ads();
}
getGoogleWebcache(url, 'section#subscription-barrier', '', 'div.article-body, article', func_post);
window.setTimeout(function () {
let ads = document.querySelectorAll('div[class*="Advert"]');
hideDOMElement(...ads);
}, 1500);
getGoogleWebcache(url, 'section#subscription-barrier', '', 'div.article-body, article');
clear_ads();
}
else if (matchDomain('newsday.com')) {
@ -5754,33 +5761,23 @@ function clearPaywall(paywall, paywall_action) {
}
}
function getGoogleWebcache(url, paywall_sel, paywall_action = '', selector, func_post = '', selector_source = selector) {
function getGoogleWebcache(url, paywall_sel, paywall_action = '', selector, selector_source = selector) {
let url_cache = 'https://webcache.googleusercontent.com/search?q=cache:' + url.split(/[#\?]/)[0];
let paywall = document.querySelectorAll(paywall_sel);
if (paywall.length) {
clearPaywall(paywall, paywall_action);
csDoneOnce = true;
replaceDomElementExt(url_cache, true, false, selector, '', selector_source);
if (func_post) {
window.setTimeout(function () {
func_post();
}, 1500);
}
}
}
function getArchive(url, paywall_sel, paywall_action = '', selector, func_post = '', text_fail = '', selector_source = selector, selector_archive = selector) {
function getArchive(url, paywall_sel, paywall_action = '', selector, text_fail = '', selector_source = selector, selector_archive = selector) {
let url_archive = 'https://' + archiveRandomDomain() + '/' + url.split(/[#\?]/)[0];
let paywall = document.querySelectorAll(paywall_sel);
if (paywall.length) {
clearPaywall(paywall, paywall_action);
csDoneOnce = true;
replaceDomElementExt(url_archive, true, false, selector, text_fail, selector_source, selector_archive);
if (func_post) {
window.setTimeout(function () {
func_post();
}, 3000);
}
}
}
@ -5856,7 +5853,11 @@ function replaceDomElementExtSrc(url, url_src, html, proxy, base64, selector, te
removeDOMElement(...invalid_links);
}
window.setTimeout(function () {
article.parentNode.replaceChild(article_new, article);
if (article.parentNode) {
article.parentNode.replaceChild(article_new, article);
if (func_post)
func_post();
}
}, 200);
}
} else

View file

@ -51,5 +51,5 @@
"webRequestBlocking",
"*://*/*"
],
"version": "3.5.1.0"
"version": "3.5.1.2"
}

View file

@ -242,7 +242,7 @@
},
"Gbnews.com": {
"allow_cookies": 1,
"block_regex": "\\.piano\\.io\\/",
"block_regex": "\\.piano\\.io",
"domain": "gbnews.com"
},
"Gplanet.co.il (not lectures)": {
@ -581,6 +581,11 @@
"block_regex": "js\\.matheranalytics\\.com",
"domain": "reviewjournal.com"
},
"Rockdelux.com": {
"allow_cookies": 1,
"cs_code": "[{\"cond\":\"div.bg-paywall\", \"rm_elem\":1, \"elems\": [{\"cond\":\"body\", \"rm_attrib\":\"class|style\"}, {\"cond\":\"div#body\", \"rm_attrib\":\"style\"}]}]",
"domain": "rockdelux.com"
},
"Schwaebische-post.de": {
"allow_cookies": 1,
"block_regex": "\\.schwaebische-post\\.de\\/sub\\/js\\/pc-offer-west\\.js",
@ -684,6 +689,11 @@
"domain": "thecourier.co.uk",
"useragent": "googlebot"
},
"Thedailymash.co.uk": {
"allow_cookies": 1,
"block_regex": "\\.flip-pay\\.com",
"domain": "thedailymash.co.uk"
},
"Theday.com": {
"allow_cookies": 1,
"block_regex": "js\\.pelcro\\.com",

View file

@ -827,5 +827,5 @@
"*://archive.vn/*",
"*://webcache.googleusercontent.com/*"
],
"version": "3.5.1.0"
"version": "3.5.1.2"
}

View file

@ -2945,4 +2945,4 @@ var fr_groupe_ebra_nofix_domains = ['bienpublic.com', 'dna.fr', 'estrepublicain.
var fr_indigo_nofix_domains = ['africaintelligence.com', 'africaintelligence.fr', 'glitz.paris', 'intelligenceonline.com', 'intelligenceonline.fr', 'lalettre.fr'];
var it_gedi_nofix_domains = ['gelocal.it', 'limesonline.com'];
var nl_mediahuis_region_nofix_domains = ['gooieneemlander.nl', 'haarlemsdagblad.nl', 'ijmuidercourant.nl', 'leidschdagblad.nl', 'noordhollandsdagblad.nl'];
var nofix_sites = ['11freunde.de', 'aamulehti.fi', 'aftenposten.no', 'aftonbladet.se', 'allgaeuer-zeitung.de', 'asahi.com', 'asiatimes.com', 'autosport.com', 'aviationweek.com', 'badische-zeitung.de', 'bhaskar.com', 'bloomberglaw.com', 'bloombergtax.com', 'bnef.com', 'bnn.de', 'borsen.dk', 'businessinsider.de', 'businessinsider.jp', 'businesslive.co.za', 'businesstimes.com.sg', 'caixin.com', 'caixinglobal.com', 'caravanmagazine.in', 'catalyst-journal.com', 'chegg.com', 'codesports.com.au', 'compactmag.com', 'courrierinternational.com', 'coursehero.com', 'deutsche-wirtschafts-nachrichten.de', 'die-glocke.de', 'dn.no', 'dn.se', 'elordenmundial.com', 'entrepreneur.com', 'epw.in', 'expresso.pt', 'falter.at', 'finance.si', 'ftchinese.com', 'ftchineselive.com', 'gamestar.de', 'geo.de', 'golem.de', 'gp.se', 'handelsblatt.com', 'hbrarabic.com', 'hbrchina.org', 'hbrfrance.fr', 'heise.de', 'hln.be', 'hs.fi', 'ilsole24ore.com', 'information.dk', 'investors.com', 'iltalehti.fi', 'jacobin.com', 'jeuneafrique.com', 'jungefreiheit.de', 'kleinezeitung.at', 'lavie.fr', 'lavozdegalicia.es', 'law360.co.uk', 'law360.com', 'le1hebdo.fr', 'leconomiste.com', 'lefilmfrancais.com', 'lemonde.fr', 'lequipe.fr', 'lesjours.fr', 'letemps.ch', 'liberation.fr', 'limburger.nl', 'main-echo.de', 'mainpost.de', 'manager-magazin.de', 'medianama.com', 'mediapart.fr', 'milanofinanza.it', 'mittelbayerische.de', 'monde-diplomatique.fr', 'mondediplo.com', 'money.it', 'moneycontrol.com', 'moodys.com', 'morningstar.com', 'motorsport.com', 'moz.de', 'nachrichten.at', 'nationaljournal.com', 'nature.com', 'nbr.co.nz', 'news24.com', 'newslaundry.com', 'nn.de', 'nwzonline.de', 'observador.pt', 'ouest-france.fr', 'philonomist.com', 'pnp.de', 'politicopro.com', 'politiken.dk', 'pressreader.com', 'publico.pt', 'quillette.com', 'republic.ru', 'rheinpfalz.de', 'risk.net', 'rnz.de', 'saechsische.de', 'sciencedirect.com', 'springer.com', 'statnews.com', 'stern.de', 'stimme.de', 'straitstimes.com', 'stratfor.com', 'streetinsider.com', 'substack.com', 'suedkurier.de', 'swp.de', 'taxation.co.uk', 'taxjournal.com', 'techcrunch.com', 'the-ken.com', 'theinformation.com', 'theinitium.com', 'themorningcontext.com', 'theparisreview.org', 'thestar.com.my', 'thewirechina.com', 'weltwoche.ch', 'weltwoche.de', 'wissenschaft.de', 'wiwo.de', 'worldpoliticsreview.com', 'wz.de', 'ynet.co.il'].concat(be_mediahuis_nofix_domains, de_funke_medien_nofix_domains, de_rp_aachen_medien_nofix_domains, de_westfalen_medien_nofix_domains, fr_groupe_ebra_nofix_domains, fr_indigo_nofix_domains, it_gedi_nofix_domains, nl_mediahuis_region_nofix_domains);
var nofix_sites = ['11freunde.de', 'aamulehti.fi', 'aftenposten.no', 'aftonbladet.se', 'allgaeuer-zeitung.de', 'asahi.com', 'asiatimes.com', 'autosport.com', 'aviationweek.com', 'badische-zeitung.de', 'bhaskar.com', 'bloomberglaw.com', 'bloombergtax.com', 'bnef.com', 'bnn.de', 'borsen.dk', 'businessinsider.de', 'businessinsider.jp', 'businesslive.co.za', 'businesstimes.com.sg', 'caixin.com', 'caixinglobal.com', 'caravanmagazine.in', 'catalyst-journal.com', 'chegg.com', 'codesports.com.au', 'compactmag.com', 'courrierinternational.com', 'coursehero.com', 'deutsche-wirtschafts-nachrichten.de', 'die-glocke.de', 'dn.no', 'dn.se', 'elordenmundial.com', 'entrepreneur.com', 'epw.in', 'expresso.pt', 'falter.at', 'finance.si', 'ftchinese.com', 'ftchineselive.com', 'gamestar.de', 'geo.de', 'golem.de', 'gp.se', 'handelsblatt.com', 'hbrarabic.com', 'hbrchina.org', 'hbrfrance.fr', 'heise.de', 'hln.be', 'hs.fi', 'ilsole24ore.com', 'information.dk', 'investors.com', 'iltalehti.fi', 'jacobin.com', 'jeuneafrique.com', 'jungefreiheit.de', 'kleinezeitung.at', 'lavie.fr', 'lavozdegalicia.es', 'law360.co.uk', 'law360.com', 'le1hebdo.fr', 'leconomiste.com', 'lefilmfrancais.com', 'lemonde.fr', 'lequipe.fr', 'lesjours.fr', 'letemps.ch', 'liberation.fr', 'limburger.nl', 'main-echo.de', 'mainpost.de', 'manager-magazin.de', 'medianama.com', 'mediapart.fr', 'milanofinanza.it', 'mittelbayerische.de', 'monde-diplomatique.fr', 'mondediplo.com', 'money.it', 'moneycontrol.com', 'moodys.com', 'morningstar.com', 'motorsport.com', 'moz.de', 'nachrichten.at', 'nationaljournal.com', 'nature.com', 'nbr.co.nz', 'news24.com', 'newslaundry.com', 'nn.de', 'nwzonline.de', 'observador.pt', 'ouest-france.fr', 'philonomist.com', 'pnp.de', 'politicopro.com', 'politiken.dk', 'pressreader.com', 'publico.pt', 'quillette.com', 'rbc.ru', 'republic.ru', 'rheinpfalz.de', 'risk.net', 'rnz.de', 'saechsische.de', 'sciencedirect.com', 'springer.com', 'statnews.com', 'stern.de', 'stimme.de', 'straitstimes.com', 'stratfor.com', 'streetinsider.com', 'substack.com', 'suedkurier.de', 'swp.de', 'taxation.co.uk', 'taxjournal.com', 'techcrunch.com', 'the-ken.com', 'theinformation.com', 'theinitium.com', 'themorningcontext.com', 'theparisreview.org', 'thestar.com.my', 'thewirechina.com', 'weltwoche.ch', 'weltwoche.de', 'wissenschaft.de', 'wiwo.de', 'worldpoliticsreview.com', 'wz.de', 'ynet.co.il'].concat(be_mediahuis_nofix_domains, de_funke_medien_nofix_domains, de_rp_aachen_medien_nofix_domains, de_westfalen_medien_nofix_domains, fr_groupe_ebra_nofix_domains, fr_indigo_nofix_domains, it_gedi_nofix_domains, nl_mediahuis_region_nofix_domains);

View file

@ -17,6 +17,13 @@
"remove_cookies_select_drop": ["xbc"],
"upd_version": "3.4.8.4"
},
"Die Zeit (link to archive.is)": {
"domain": "zeit.de",
"allow_cookies": 1,
"add_ext_link": "aside#paywall|article",
"add_ext_link_type": "archive.is",
"upd_version": "3.5.1.2"
},
"El Diario.es": {
"domain": "eldiario.es",
"allow_cookies": 1,

View file

@ -2,8 +2,8 @@
"addons": {
"magnolia_limited_permissions@12.34": {
"updates": [
{ "version": "3.5.1.0",
"update_link": "https://gitlab.com/magnolia1234/bpc-uploads/-/raw/master/bypass_paywalls_clean-3.5.1.0-custom.xpi" }
{ "version": "3.5.1.2",
"update_link": "https://gitlab.com/magnolia1234/bpc-uploads/-/raw/master/bypass_paywalls_clean-3.5.1.2-custom.xpi" }
]
}
}