Simplify blocking of specific paywall-scripts
This commit is contained in:
parent
abafed0e08
commit
02f48ccb7b
@ -26,12 +26,13 @@ The following instructions are needed to install third-party extensions in [Chro
|
||||
1. Install [Yandex Browser](https://play.google.com/store/apps/details?id=com.yandex.browser&hl=en) from the Google PlayStore (Bypass Paywalls Clean doesn't work with Kiwi Browser yet).
|
||||
2. Follow Chrome instructions located just above (step 6: pick `manifest.json` instead of the folder).
|
||||
|
||||
#### Other Chromium browsers (Opera/Vivaldi/Yandex/Brave)
|
||||
#### Other Chromium browsers (Opera/Vivaldi/Yandex)
|
||||
1. Download the extension as a .crx file from the [download page](https://bitbucket.org/magnolia1234/bypass-paywalls-chrome-clean/downloads).
|
||||
2. In your browser go to the extensions page.
|
||||
3. Enable Developer Mode.
|
||||
4. Drag your .crx file anywhere on the page to import it.
|
||||
5. If dragging crx does not work, try Chrome procedure (above).
|
||||
* Brave Browser doesn't support specific blocking of external paywall-scripts (referer of main site isn't available in Javascript)
|
||||
|
||||
#### Firefox
|
||||
Visit the [Firefox repository](https://bitbucket.org/magnolia1234/bypass-paywalls-firefox-clean) of Bypass Paywall Clean.
|
||||
|
@ -396,8 +396,8 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) {
|
||||
|
||||
// check for blocked regular expression: domain enabled, match regex, block on an internal or external regex
|
||||
var blockedDomains = Object.keys(blockedRegexes);
|
||||
var domain = (matchUrlDomain(blockedDomains, details.url) || matchUrlDomain(blockedDomains, header_referer));
|
||||
if (domain && details.url.match(blockedRegexes[domain]) && (isSiteEnabled({url: details.url}) || isSiteEnabled({url: header_referer}))) {
|
||||
var domain = matchUrlDomain(blockedDomains, header_referer);
|
||||
if (domain && details.url.match(blockedRegexes[domain]) && isSiteEnabled({url: header_referer})) {
|
||||
// allow BG paywall-script to set cookies in homepage/sections (else no article-text)
|
||||
if (domain == 'bostonglobe.com' &&
|
||||
(header_referer === 'https://www.bostonglobe.com/' || header_referer.includes('/?p1=BGHeader_') || header_referer.includes('/?p1=BGMenu_'))) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user