mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-10 06:27:48 +01:00
Update custom sites (amp redirect)
This commit is contained in:
parent
fe5c3bf56a
commit
d364c4a8f0
5 changed files with 9 additions and 6 deletions
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<h2>Custom Sites</h2>
|
||||
<div style="width:90%;">
|
||||
To add a new site, enter an unique title/domain (without www.).<br>
|
||||
Select options for useragent (like Googlebot), set referer (ignored when Googlebot is set), block Javascript (on (sub)domain(s) of site and/or external domains), block regular expression and/or unhide text on amp-page.<br>
|
||||
Select options for useragent (like Googlebot), set referer (ignored when Googlebot is set), set random ip-address, block Javascript (on (sub)domain(s) of site and/or external domains), block regular expression and/or unhide text on (or when paywall(selector) redirect to) amp-page.<br>
|
||||
Custom sites (new) are enabled automatically in <small><button><a href="options.html" style="text-decoration:none;color:inherit">Options</a></button></small> (cookies will be removed by default unless you enable allow_cookies).<br>
|
||||
If you want to use custom sites (for non-listed sites) enable it in <small><button><a href="optin/opt-in.html" style="text-decoration:none;color:inherit">Opt-in</a></button></small>
|
||||
<strong>Custom sites enabled: <span id="custom-enabled"></span></strong><br>
|
||||
|
|
|
@ -191,6 +191,7 @@ function edit_options() {
|
|||
document.querySelector('input[data-key="block_javascript_ext"]').checked = (edit_site.block_javascript_ext > 0);
|
||||
document.querySelector('input[data-key="block_regex"]').value = edit_site.block_regex ? edit_site.block_regex : '';
|
||||
document.querySelector('input[data-key="amp_unhide"]').checked = (edit_site.amp_unhide > 0);
|
||||
document.querySelector('input[data-key="amp_redirect"]').value = edit_site.amp_redirect ? edit_site.amp_redirect : '';
|
||||
document.querySelector('select[data-key="referer"]').selectedIndex = referer_options.indexOf(edit_site.referer);
|
||||
document.querySelector('select[data-key="random_ip"]').selectedIndex = random_ip_options.indexOf(edit_site.random_ip);
|
||||
});
|
||||
|
@ -253,7 +254,8 @@ function renderOptions() {
|
|||
'block_javascript': 1,
|
||||
'block_javascript_ext': 1,
|
||||
'block_regex': 0,
|
||||
'amp_unhide': 1
|
||||
'amp_unhide': 1,
|
||||
'amp_redirect': 0
|
||||
};
|
||||
for (var key in add_checkboxes) {
|
||||
labelEl = document.createElement('label');
|
||||
|
@ -316,7 +318,8 @@ function renderOptions() {
|
|||
(sites_custom[key]['useragent'] ? ' | useragent: ' + sites_custom[key]['useragent'] : '') +
|
||||
(sites_custom[key]['referer'] ? ' | referer: ' + sites_custom[key]['referer'] : '') +
|
||||
(sites_custom[key]['random_ip'] ? ' | random_ip: ' + sites_custom[key]['random_ip'] : '') +
|
||||
(sites_custom[key]['amp_unhide'] > 0 ? ' | amp_unhide' : '');
|
||||
(sites_custom[key]['amp_unhide'] > 0 ? ' | amp_unhide' : '') +
|
||||
(sites_custom[key]['amp_redirect'] ? ' | amp_redirect' : '');
|
||||
optionEl.value = key;
|
||||
selectEl.add(optionEl);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue