Update sites: fix Google webcache

This commit is contained in:
magnolia1234 2023-12-14 09:36:46 +01:00
parent 3e3c8a468f
commit 92210e430d
6 changed files with 8 additions and 22 deletions

View file

@ -1514,7 +1514,7 @@ ext_api.runtime.onMessage.addListener(function (message, sender) {
getArticleSrc(message); getArticleSrc(message);
function getArticleSrc(message) { function getArticleSrc(message) {
let url_src = message.data.url_src || message.data.url; let url_src = message.data.url_src || message.data.url;
fetch(message.data.url_src) fetch(url_src)
.then(response => { .then(response => {
if (response.ok) { if (response.ok) {
response.text().then(html => { response.text().then(html => {

View file

@ -12,6 +12,7 @@ Remove Nordwest Zeitung (fix obsolete)
Remove Wissenschaft.de (fix obsolete) Remove Wissenschaft.de (fix obsolete)
Fix Australia News Corp (media on amp) Fix Australia News Corp (media on amp)
Fix Faz.net (disable Zeitung subdomain) Fix Faz.net (disable Zeitung subdomain)
Update sites: fix Google webcache
* v3.4.6.0 (2023-12-10) * v3.4.6.0 (2023-12-10)
Remove Morgenpost.de (Funke; fix obsolete) Remove Morgenpost.de (Funke; fix obsolete)

View file

@ -3779,17 +3779,7 @@ else if (matchDomain('defector.com')) {
let pars = article.querySelectorAll('p'); let pars = article.querySelectorAll('p');
if (pars.length < 3) { if (pars.length < 3) {
let url = window.location.href.split('?')[0]; let url = window.location.href.split('?')[0];
fetch(url) replaceDomElementExt(url, false, false, article_sel);
.then(response => {
if (response.ok) {
response.text().then(html => {
let parser = new DOMParser();
let doc = parser.parseFromString(DOMPurify.sanitize(html, dompurify_options), 'text/html');
let article_new = doc.querySelector(article_sel);
article.parentNode.replaceChild(article_new, article);
});
}
});
} }
}, 1000); }, 1000);
} }
@ -4421,7 +4411,7 @@ else if (matchDomain('newrepublic.com')) {
else if (matchDomain('newscientist.com')) { else if (matchDomain('newscientist.com')) {
let url = window.location.href; let url = window.location.href;
func_post = function () { let func_post = function () {
let lazy_images = document.querySelectorAll('img.lazyload[data-src]:not([src])'); let lazy_images = document.querySelectorAll('img.lazyload[data-src]:not([src])');
for (let elem of lazy_images) for (let elem of lazy_images)
elem.src = elem.getAttribute('data-src').split('?')[0] + '?width=800'; elem.src = elem.getAttribute('data-src').split('?')[0] + '?width=800';
@ -5871,7 +5861,7 @@ function replaceDomElementExt(url, proxy, base64, selector, text_fail = '', sele
let article = document.querySelector(selector); let article = document.querySelector(selector);
if (response.ok) { if (response.ok) {
response.text().then(html => { response.text().then(html => {
replaceDomElementExtSrc(url, html, false, base64, selector, text_fail, selector_source); replaceDomElementExtSrc(url, '', html, false, base64, selector, text_fail, selector_source);
}); });
} else { } else {
replaceTextFail(url, article, proxy, text_fail); replaceTextFail(url, article, proxy, text_fail);

View file

@ -51,5 +51,5 @@
"webRequestBlocking", "webRequestBlocking",
"*://*/*" "*://*/*"
], ],
"version": "3.4.6.4" "version": "3.4.6.5"
} }

View file

@ -1,6 +1,6 @@
{ {
"###_remove_sites": { "###_remove_sites": {
"cs_code": "africaintelligence.fr, arkansasonline.com, columbian.com, die-glocke.de, doorbraak.be, gp.se, intelligenceonline.com, intelligenceonline.fr, interestingengineering.com, jeuneafrique.com, lalettrea.fr, lastampa.it, lavozdegalicia.es, law360.com, lepoint.fr, limburger.nl, manager-magazin.de, ouest-france.fr, pressherald.com, repubblica.it, risk.net, saechsische.de, sueddeutsche.de, swarajyamag.com, theepochtimes.com, theinformation.com, thestage.co.uk, thetexan.news, theweek.com, vikatan.com", "cs_code": "africaintelligence.fr, al-monitor.com, arkansasonline.com, columbian.com, die-glocke.de, doorbraak.be, gp.se, intelligenceonline.com, intelligenceonline.fr, interestingengineering.com, jeuneafrique.com, lalettrea.fr, lastampa.it, lavozdegalicia.es, law360.com, lepoint.fr, limburger.nl, manager-magazin.de, ouest-france.fr, pressherald.com, repubblica.it, risk.net, saechsische.de, sueddeutsche.de, swarajyamag.com, theepochtimes.com, theinformation.com, thestage.co.uk, thetexan.news, theweek.com, vikatan.com",
"domain": "###" "domain": "###"
}, },
"Abajournal.com": { "Abajournal.com": {
@ -19,11 +19,6 @@
"allow_cookies": 1, "allow_cookies": 1,
"domain": "airmail.news" "domain": "airmail.news"
}, },
"Al-monitor.com": {
"allow_cookies": 1,
"cs_code": "[{\"cond\":\"body.nodetype--memo\", \"rm_class\":\"nodetype--memo\"}, {\"cond\":\"div.memo--callout--wrapper\",\"rm_elem\":1}]",
"domain": "al-monitor.com"
},
"Artsprofessional.co.uk": { "Artsprofessional.co.uk": {
"allow_cookies": 1, "allow_cookies": 1,
"block_regex": "\\.artsprofessional\\.co\\.uk\\/.+\\/js\\/content_paywall\\.js", "block_regex": "\\.artsprofessional\\.co\\.uk\\/.+\\/js\\/content_paywall\\.js",

View file

@ -822,5 +822,5 @@
"*://archive.vn/*", "*://archive.vn/*",
"*://webcache.googleusercontent.com/*" "*://webcache.googleusercontent.com/*"
], ],
"version": "3.4.6.4" "version": "3.4.6.5"
} }