From 3b4a9097a1f9fe039c7ab1f8d626124afa2de45e Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Sat, 30 Apr 2022 11:25:42 +0200 Subject: [PATCH] Add Puck.news --- README.md | 1 + changelog.txt | 1 + contentScript.js | 13 +++++++++++++ manifest.json | 3 ++- sites.js | 4 ++++ sites_updated.json | 18 ++++++++++++++++++ 6 files changed, 39 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a8ddc2f..a0c5e4f 100644 --- a/README.md +++ b/README.md @@ -165,6 +165,7 @@ Grouped in options:\ [First Things](https://www.firstthings.com) - [Medium](https://www.medium.com)* (for custom domains enable custom sites) - [National Review](https://www.nationalreview.com) - +[Puck.news](https://puck.news) - [Rolling Stone](https://www.rollingstone.com) - [RugbyPass](https://www.rugbypass.com) - [Slate](https://slate.com) - diff --git a/changelog.txt b/changelog.txt index 3423f59..cd91530 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,7 @@ Changelog Bypass Paywalls Clean - Firefox Post-release +Add Puck.news Fix El Espectador Fix eNotes Fix Grupo Prensa Iberica (opt-in to custom sites for unlisted) diff --git a/contentScript.js b/contentScript.js index ae9bf84..5592753 100644 --- a/contentScript.js +++ b/contentScript.js @@ -3160,6 +3160,19 @@ else if (matchDomain('outlookindia.com')) { } } +else if (matchDomain('puck.news')) { + let paywall = document.querySelector('.paywall'); + if (paywall) { + removeDOMElement(paywall); + let overlay = document.querySelector('body.paywall-active'); + if (overlay) + overlay.classList.remove('paywall-active'); + let article_style = document.querySelector('article[style]'); + if (article_style) + article_style.removeAttribute('style'); + } +} + else if (matchDomain('quora.com')) { let overlays = document.querySelectorAll('div[class*="_overlay"]'); removeDOMElement(...overlays); diff --git a/manifest.json b/manifest.json index 106a9a5..cb356c7 100644 --- a/manifest.json +++ b/manifest.json @@ -463,6 +463,7 @@ "*://*.precisiononcologynews.com/*", "*://*.prevention.com/*", "*://*.prospectmagazine.co.uk/*", + "*://*.puck.news/*", "*://*.quora.com/*", "*://*.quotidiano.net/*", "*://*.quotidianodipuglia.it/*", @@ -665,5 +666,5 @@ "*://*.wsj.net/*", "*://webcache.googleusercontent.com/*" ], - "version": "2.6.6.4" + "version": "2.6.6.5" } diff --git a/sites.js b/sites.js index 6a76a32..50962c4 100644 --- a/sites.js +++ b/sites.js @@ -1359,6 +1359,10 @@ var defaultSites = { domain: "prospectmagazine.co.uk", allow_cookies: 1 }, + "Puck.news": { + domain: "puck.news", + allow_cookies: 1 + }, "Quartz": { domain: "qz.com", allow_cookies: 1, diff --git a/sites_updated.json b/sites_updated.json index 8373523..7dfe6a0 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -64,6 +64,24 @@ "domain": "podiumrunner.com", "group_rule": "###_gr_usa_outside_mag_domains" }, + "Puck.news": { + "domain": "puck.news", + "allow_cookies": 1, + "cs_code": [{ + "cond": ".paywall", + "rm_elem": 1, + "elems": [{ + "cond": "body.paywall-active", + "rm_class": "paywall-active" + }, { + "cond": "article[style]", + "rm_attrib": "style" + } + ] + } + ], + "new_site": 1 + }, "Rock and Ice": { "domain": "rockandice.com", "group_rule": "###_gr_usa_outside_mag_domains"