From d364c4a8f01d125211ea604580307db549b2f4af Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Wed, 22 Dec 2021 20:28:59 +0100 Subject: [PATCH] Update custom sites (amp redirect) --- README.md | 2 +- background.js | 2 +- changelog.txt | 2 +- options/options_custom.html | 2 +- options/options_custom.js | 7 +++++-- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index becaf57..7fb29da 100644 --- a/README.md +++ b/README.md @@ -678,7 +678,7 @@ Check 'Options'-link in popup-menu and go to custom sites. \* by default BPC has limited permissions, but you can opt-in to enable custom sites (and also clear cookies/block general paywall-scripts for non-listed sites). You can also just request permissions for the custom sites you added yourself. By default sites' cookies/local storage are removed after page loads (to bypass article limit). -Also you can enable Googlebot/Bingbot user-agent, set the referer (to Facebook, Google or Twitter; ignored when Googlebot is set), disable Javascript for (sub)domain(s)/external sources, block regular expression and/or unhide text on amp-page. +Also you can enable Googlebot/Bingbot user-agent, set referer (to Facebook, Google or Twitter; ignored when Googlebot is set), set random ip-address, disable Javascript for (sub)domain(s) and/or external domains, block regular expression and/or unhide text on (or when paywall(selector) redirect to) amp-page. [Example list of custom sites](https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/blob/master/custom/sites_custom.json) or [download list (json)](https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/raw/master/custom/sites_custom.json) diff --git a/background.js b/background.js index e31721d..e92da8a 100644 --- a/background.js +++ b/background.js @@ -251,7 +251,7 @@ function set_rules(sites, sites_updated, sites_custom) { } // updated if (rule.amp_redirect) - amp_redirect[domain] = rule.amp_redirect; + amp_redirect[domain] = rule.amp_redirect.paywall ? rule.amp_redirect : {paywall: rule.amp_redirect}; if (rule.cs_code) cs_code[domain] = rule.cs_code; // custom diff --git a/changelog.txt b/changelog.txt index d1a5e99..8540f8a 100644 --- a/changelog.txt +++ b/changelog.txt @@ -7,7 +7,7 @@ Add Les Inrockuptibles (France) Fix Helsingin Sanomat (dynamic) Fix The Diplomat (cookies) Fix Times of India (amp) -Update custom sites (random ip) +Update custom sites (random ip/amp redirect) * v2.4.8.0 (2021-12-19) Add Aachener-Nachrichten.de diff --git a/options/options_custom.html b/options/options_custom.html index 55d6999..7497a3a 100644 --- a/options/options_custom.html +++ b/options/options_custom.html @@ -20,7 +20,7 @@