Add Golem.de

This commit is contained in:
magnolia1234 2022-07-28 20:28:23 +02:00
parent ee58544f8a
commit 08984bb0ca
6 changed files with 51 additions and 2 deletions

View File

@ -484,6 +484,7 @@ Grouped in options:\
[Die Zeit](https://www.zeit.de) -
[Frankfurter Allgemeine Zeitung](https://www.faz.net) -
[Freie Presse](https://www.freiepresse.de) -
[Golem.de](https://www.golem.de) -
[Kölner Stadt-Anzeiger](https://www.ksta.de) -
[Kölnische Rundschau](https://www.rundschau-online.de) -
[Krautreporter.de](https://krautreporter.de) -

View File

@ -6,7 +6,7 @@ var ext_name = manifestData.name;
var ext_version = manifestData.version;
const cs_limit_except = ['elespanol.com', 'faz.net', 'nation.africa', 'nationalgeographic.com', 'thetimes.co.uk'];
const dompurify_sites = ['asiatimes.com', 'bloomberg.com', 'cicero.de', 'economictimes.com', 'hs.fi', 'ilmanifesto.it', 'iltalehti.fi', 'iltirreno.it', 'ipolitics.ca', 'italiaoggi.it', 'lanuovasardegna.it', 'lesechos.fr', 'marianne.net', 'newleftreview.org', 'nzherald.co.nz', 'outlookbusiness.com', 'prospectmagazine.co.uk', 'stratfor.com', 'techinasia.com', 'theathletic.com', 'timesofindia.com', 'vn.nl'].concat(be_mediahuis_domains, nl_mediahuis_region_domains, no_nhst_media_domains);
const dompurify_sites = ['asiatimes.com', 'bloomberg.com', 'cicero.de', 'economictimes.com', 'golem.de', 'hs.fi', 'ilmanifesto.it', 'iltalehti.fi', 'iltirreno.it', 'ipolitics.ca', 'italiaoggi.it', 'lanuovasardegna.it', 'lesechos.fr', 'marianne.net', 'newleftreview.org', 'nzherald.co.nz', 'outlookbusiness.com', 'prospectmagazine.co.uk', 'stratfor.com', 'techinasia.com', 'theathletic.com', 'timesofindia.com', 'vn.nl'].concat(be_mediahuis_domains, nl_mediahuis_region_domains, no_nhst_media_domains);
var currentTabUrl = '';
var csDone = false;
var optin_setcookie = false;

View File

@ -2,6 +2,7 @@
Changelog Bypass Paywalls Clean - Firefox
Post-release
Add Golem.de
Add Le Soleil - Quebec (+ regional/opt-in to custom sites)
Remove Kurier.at (fix obsolete)
Fix Bloomberg (graphics)

View File

@ -587,6 +587,48 @@ else if (matchDomain('freiepresse.de')) {
}
}
else if (matchDomain('golem.de')) {
let url = window.location.href;
let paywall = document.querySelector('article.golemplus');
if (paywall) {
paywall.classList.remove('golemplus');
csDoneOnce = true;
if (url.includes('?page='))
url = url.replace('.html', '-' + url.split('?page=')[1] + '.html').split('?')[0];
let url_cache = 'https://webcache.googleusercontent.com/search?q=cache:' + url;
replaceDomElementExt(url_cache, true, false, 'article');
window.setTimeout(function () {
let list_pages = document.querySelectorAll('ol.list-pages > li >a[href]');
for (let list_page of list_pages) {
let page = list_page.href.match(/-(\d{1,2})\.html/);
if (page && page[1]) {
list_page.href = list_page.href.replace(/-\d{1,2}\.html/, '.html') + '?page=' + page[1];
}
}
let gallery_images = document.querySelectorAll('ul[class^="golemGallery"] > li > img[data-src]');
for (let gallery_image of gallery_images) {
if (!gallery_image.src || gallery_image.src.includes('.html'))
removeDOMElement(gallery_image.parentNode);
}
let videos = document.querySelectorAll('figure.gvideofig');
for (let video of videos) {
let video_text = video.querySelector('div.gvidtext');
if (!video_text) {
let gwc_link = document.createElement('a');
gwc_link.href = url_cache;
gwc_link.innerText = 'Watch video on Google webcache';
gwc_link.target = '_blank';
video.parentNode.replaceChild(gwc_link, video);
}
}
}, 1000);
}
window.setTimeout(function () {
let ads = document.querySelectorAll('div[id^="iqadtile"], div.wraptusplit');
removeDOMElement(...ads);
}, 1000);
}
else if (matchDomain('krautreporter.de')) {
let paywall = document.querySelector('.js-article-paywall');
if (paywall) {

View File

@ -244,6 +244,7 @@
"*://*.globes.co.il/*",
"*://*.globo.com/*",
"*://*.goldcoastbulletin.com.au/*",
"*://*.golem.de/*",
"*://*.goodhousekeeping.com/*",
"*://*.gooieneemlander.nl/*",
"*://*.gq.com/*",
@ -695,5 +696,5 @@
"*://gcm.omerlocdn.com/*",
"*://webcache.googleusercontent.com/*"
],
"version": "2.7.7.3"
"version": "2.7.7.4"
}

View File

@ -589,6 +589,10 @@ var defaultSites = {
domain: "globes.co.il",
block_regex: /\.tinypass\.com\//
},
"Golem.de": {
domain: "golem.de",
allow_cookies: 1
},
"Griffith Review": {
domain: "griffithreview.com",
block_regex: /\.griffithreview\.com\/.+\/leaky-paywall\//,