From cacd007a937bb8de408546452997f8207b292144 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Thu, 5 Jan 2023 08:34:21 +0100 Subject: [PATCH] Fix Aftonbladet.se (link to archive.is) --- changelog.txt | 1 + contentScript.js | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 286226a7..c9b59715 100644 --- a/changelog.txt +++ b/changelog.txt @@ -9,6 +9,7 @@ Add PhiloMag.de Add ZeroHedge Remove Entrepreneur (fix obsolete) Remove The-Village.ru (fix obsolete) +Fix Aftonbladet.se (link to archive.is) Fix Boston Globe (css) Fix Substack (split content) Fix Telegraaf.nl diff --git a/contentScript.js b/contentScript.js index 18c2e16b..fe831af2 100644 --- a/contentScript.js +++ b/contentScript.js @@ -861,7 +861,18 @@ else } else if (window.location.hostname.match(/\.(dk|fi|se)$/)) {//denmark/finland/sweden -if (matchDomain('etc.se')) { +if (matchDomain(['aftonbladet.se'])) { + let url = window.location.href; + let paywall = document.querySelector('div.paywall'); + if (paywall) { + removeDOMElement(paywall); + let article = document.querySelector('article'); + if (article) + article.firstChild.before(archiveLink(url)); + } +} + +else if (matchDomain('etc.se')) { let paywall = document.querySelector('div.paywalled'); if (paywall) { paywall.removeAttribute('class');