From ef0461ebf43dd747bf27912de388292ca4b1782a Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Tue, 21 Feb 2023 08:44:54 +0100 Subject: [PATCH] Fix Quartz (js-newsletter) --- contentScript.js | 16 ---------------- custom/sites_custom.json | 6 ++++++ manifest.json | 1 + sites.js | 4 ++-- sites_updated.json | 5 +++++ 5 files changed, 14 insertions(+), 18 deletions(-) diff --git a/contentScript.js b/contentScript.js index 4dcfc1f..828f295 100644 --- a/contentScript.js +++ b/contentScript.js @@ -3898,22 +3898,6 @@ else if (matchDomain('quora.com')) { }, 500); } -else if (matchDomain('qz.com')) { - if (window.location.pathname.startsWith('/emails/')) { - let paywall = document.querySelector('div.js_regwalled-content > div[class]'); - if (paywall) { - paywall.removeAttribute('class'); - paywall.parentNode.removeAttribute('class'); - let login = pageContains('h2[class]', /This story is exclusive to/); - if (login.length) - removeDOMElement(login[0].parentNode); - let noscroll = document.querySelector('iframe[scrolling]'); - if (noscroll) - noscroll.removeAttribute('scrolling'); - } - } -} - else if (matchDomain('rugbypass.com')) { if (window.location.pathname.startsWith('/plus/')) { let paywall = document.querySelector('.premium-fold-bottom'); diff --git a/custom/sites_custom.json b/custom/sites_custom.json index 0cda0d1..9f458af 100644 --- a/custom/sites_custom.json +++ b/custom/sites_custom.json @@ -392,6 +392,12 @@ "cs_code": "[{\"cond\":\"div[data-cy='upgradeAccountPaywall']\",\"rm_elem\":1,\"elems\":[{\"cond\":\"div.paywall\",\"rm_attrib\":\"class|style\"},{\"cond\":\"div.css-tu9vsa\",\"rm_attrib\":\"class\"}]}]", "domain": "stylist.co.uk" }, + "Substack.com": { + "add_ext_link": "div.paywall:not(.modal-paywall)|div.available-content", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "substack.com" + }, "Supchina.com": { "allow_cookies": 1, "block_regex": "\\.tinypass\\.com", diff --git a/manifest.json b/manifest.json index 75b5d8a..ff6751e 100644 --- a/manifest.json +++ b/manifest.json @@ -731,6 +731,7 @@ "*://*.flip-pay.com/*", "*://*.gitlab.com/magnolia1234/*", "*://*.hadrianpaywall.com/*", + "*://*.kinja-static.com/*", "*://*.medscapestatic.com/*", "*://*.ndcmediagroep.nl/*", "*://*.nyt.com/*", diff --git a/sites.js b/sites.js index dceb8f8..ae5e4f6 100644 --- a/sites.js +++ b/sites.js @@ -1578,10 +1578,10 @@ var defaultSites = { domain: "puck.news", allow_cookies: 1 }, - "Quartz": { + "Quartz (newsletter)": { domain: "qz.com", allow_cookies: 1, - block_regex: /\.tinypass\.com\// + block_regex: /\.kinja-static\.com\/assets\/.+\/regwalled-content.+\.js/ }, "Quillette (link to archive.is)": { domain: "quillette.com", diff --git a/sites_updated.json b/sites_updated.json index 22958f9..47d0bf2 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -75,5 +75,10 @@ "NK News (free articles only)": { "domain": "nknews.org", "remove_cookies_select_drop": ["issuem_lp", "issuem_lp_kp"] + }, + "Quartz": { + "domain": "qz.com", + "allow_cookies": 1, + "block_regex": "\\.kinja-static\\.com\\/assets\\/.+\\/regwalled-content.+\\.js" } }