Fix Nautilus

master
magnolia1234 2022-06-24 20:57:20 +02:00
parent a9276460b5
commit e2deb274be
7 changed files with 33 additions and 2 deletions

View File

@ -617,11 +617,12 @@ ext_api.webRequest.onHeadersReceived.addListener(function (details) {
['blocking', 'responseHeaders']);
// block inline script
var block_js_inline = ["*://*.elpais.com/*", "*://*.theglobeandmail.com/*"];
var block_js_inline = ["*://*.elpais.com/*", "*://*.nautil.us/*", "*://*.theglobeandmail.com/*"];
if (block_js_inline.length)
ext_api.webRequest.onHeadersReceived.addListener(function (details) {
let url_path = details.url.split('?')[0];
let excluded = (matchUrlDomain('elpais.com', details.url) && (url_path.includes('/elpais.com') || !url_path.includes('.html')))
|| (matchUrlDomain('nautil.us', details.url) && !details.url.match(/((\w)+(\-)+){3,}/))
|| (matchUrlDomain('theglobeandmail.com', details.url) && (!enabledSites.includes('#options_optin_tgam_premium') || !details.url.includes('?rel=premium')));
if (!isSiteEnabled(details) || excluded)
return;

View File

@ -7,6 +7,7 @@ Fix Business Standard
Fix Helsingin Sanomat (dynamic-json)
Fix Koelner Stadt-Anzeiger & Koelnische Rundschau
Fix LesEchos.fr
Fix Nautilus
Fix Repubblica.it & LaStampa.it (videos-gtm)
* v2.7.2.0 (2022-06-06)

View File

@ -3190,6 +3190,23 @@ else if (matchDomain('nationalreview.com')) {
removeDOMElement(...adverts);
}
else if (matchDomain('nautil.us')) {
// plus code in contentScript_once.js
let hidden_images = document.querySelectorAll('img[src^="data:image"][data-src]');
for (let hidden_image of hidden_images)
hidden_image.src = hidden_image.getAttribute('data-src');
let empty_video_iframes = document.querySelectorAll('iframe[src="about:blank"][data-litespeed-src]');
for (let empty_video_iframe of empty_video_iframes)
empty_video_iframe.src = empty_video_iframe.getAttribute('data-litespeed-src');
window.setTimeout(function () {
let banners = document.querySelectorAll('div[class^="a__sc-np"], div.subscibe-bar');
removeDOMElement(...banners);
let overflows = document.querySelectorAll('html[style], body[style]');
for (let overflow of overflows)
overflow.removeAttribute('style');
}, 1000);
}
else if (matchDomain('newleftreview.org')) {
window.setTimeout(function () {
let url = window.location.href;

View File

@ -53,6 +53,15 @@ else if (matchDomain('nationalgeographic.com')) {
waitDOMElement('div[id^="fittPortal"]', 'DIV', natgeo_func, false);
}
else if (matchDomain('nautil.us')) {
let hidden_images = document.querySelectorAll('img[src^="data:image"][data-src]');
for (let hidden_image of hidden_images)
hidden_image.src = hidden_image.getAttribute('data-src');
let empty_video_iframes = document.querySelectorAll('iframe[src="about:blank"][data-litespeed-src]');
for (let empty_video_iframe of empty_video_iframes)
empty_video_iframe.src = empty_video_iframe.getAttribute('data-litespeed-src');
}
else if (matchDomain('nyteknik.se')) {
window.setTimeout(function () {
let hidden_images = document.querySelectorAll('img[src=""][data-proxy-image]');

View File

@ -26,6 +26,7 @@
"matches": [
"*://*.inkl.com/*",
"*://*.nationalgeographic.com/*",
"*://*.nautil.us/*",
"*://*.nyteknik.se/*",
"*://*.nzherald.co.nz/*",
"*://*.gitlab.com/magnolia1234"

View File

@ -29,6 +29,7 @@
"matches": [
"*://*.inkl.com/*",
"*://*.nationalgeographic.com/*",
"*://*.nautil.us/*",
"*://*.nyteknik.se/*",
"*://*.nzherald.co.nz/*",
"*://*.gitlab.com/magnolia1234"

View File

@ -1228,7 +1228,8 @@ var defaultSites = {
useragent: "googlebot"
},
"Nautilus": {
domain: "nautil.us"
domain: "nautil.us",
allow_cookies: 1
},
"Neue Osnabrücker Zeitung": {
domain: "noz.de",