From dda8dde350d23b943e4ff9625608c9f4e8d95b27 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Fri, 7 Apr 2023 10:06:43 +0200 Subject: [PATCH] Fix Nautil.us (cookies) --- changelog.txt | 1 + contentScript.js | 15 ++------------- sites.js | 3 +-- sites_updated.json | 4 ++++ 4 files changed, 8 insertions(+), 15 deletions(-) diff --git a/changelog.txt b/changelog.txt index 2b30a9c7..632a619e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -7,6 +7,7 @@ Add Haas Mediengruppe (opt-in to custom sites) Remove Griffith Review (fix obsolete) Fix Gannett Group (identify sites) Fix LesEchos.fr (json) +Fix Nautil.us (cookies) * v3.1.2.0 (2023-04-02) Add Epicurious (Conde Nast) diff --git a/contentScript.js b/contentScript.js index 013c0405..7ea43ed3 100644 --- a/contentScript.js +++ b/contentScript.js @@ -3710,19 +3710,8 @@ else if (matchDomain('nationalreview.com')) { } 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'); - 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); + let banners = document.querySelectorAll('div[class^="a__sc-np"], div.subscibe-bar'); + removeDOMElement(...banners); } else if (matchDomain('newleftreview.org')) { diff --git a/sites.js b/sites.js index 3e74039a..a1be6876 100644 --- a/sites.js +++ b/sites.js @@ -1377,8 +1377,7 @@ var defaultSites = { }, "Nautilus": { domain: "nautil.us", - allow_cookies: 1, - block_js_inline: /\/nautil\.us\/((\w)+(\-)+){3,}/ + remove_cookies_select_drop: ["arc", "sfa"] }, "NOZ/MHN Mediengruppe": { domain: "###_de_noz_mhn", diff --git a/sites_updated.json b/sites_updated.json index 5086de24..56499432 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -65,6 +65,10 @@ "remove_cookies_select_drop": ["TID_ID"], "block_regex": "(\\.margriet\\.nl\\/temptation\\/resolve|temptation\\.margriet\\.nl\\/temptation\\.js)" }, + "Nautilus": { + "domain": "nautil.us", + "remove_cookies_select_drop": ["arc", "sfa"] + }, "Revue Conflits": { "domain": "revueconflits.com", "allow_cookies": 1,