Maintenance request host permission (disable for mobile)

merge-requests/15/head
magnolia1234 11 months ago
parent 88b4ba177d
commit ce5848602b

@ -31,14 +31,14 @@ PS although add-on was removed from [Mozilla's add-on store (AMO)](https://addon
If you want to permanently install the latest [master ZIP-file from GitLab](https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/archive/master/bypass-paywalls-firefox-clean-master.zip) (with post-release fixes) use a Firefox browser which allows using unsigned add-ons like Firefox Developer Portable (go to about:config and set xpinstall.signatures.required to false) or LibreWolf (for both no automatic updates of add-on).\
Or load a temporary add-on in regular Firefox (go to about:debugging#/runtime/this-firefox & load manifest.json from unpacked (master-zip) folder.
By default BPC has limited host permissions, but you can opt-in to enable custom sites (and also clear cookies/block general paywall-scripts for unlisted sites). You can also just request permissions for the custom sites you added yourself (or click *clear cookies* (BPC-icon) to ask for permission for current site).\
By default BPC has limited host permissions, but you can opt-in to enable custom sites (and also clear cookies/block general paywall-scripts for unlisted sites). You can also just request host permissions for the custom sites you added yourself (or click *clear cookies* (BPC-icon) to ask for permission for current site).\
You can also install the custom add-on version (with host permissions for all sites).
### Update
Add-on will automatically update or you can do a manual check for updates (in about:addons).\
Either way you have to allow host permissions for newly supported sites (else no update will be installed).\
You can also check for update of site rules at startup (opt-in); only available until about 10 days after fix-release.\
For new sites you also have to opt-in to custom sites/request permissions for new domains (or wait for new release).
For new sites you also have to opt-in to custom sites/request host permissions for new domains (or wait for new release).
### Android
Add-on was removed by Mozilla from [add-on store (AMO)](https://addons.mozilla.org).\
@ -926,7 +926,7 @@ Remember to check the [previous requests](https://gitlab.com/magnolia1234/bypass
### Add custom site
Add your own custom site (also for testing).
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 unlisted sites). You can also just request permissions for the custom sites you added yourself (or *clear cookies* (BPC-icon) to ask for permission for current site).
\* by default BPC has limited permissions, but you can opt-in to enable custom sites (and also clear cookies/block general paywall-scripts for unlisted sites). You can also just request host permissions for the custom sites you added yourself (or *clear cookies* (BPC-icon) to ask for permission for current site).
By default sites' cookies/local storage are blocked/removed (for example to bypass article limit when metered paywall).

@ -442,6 +442,15 @@ ext_api.storage.local.get({
let sites_new = Object.keys(defaultSites).filter(x => defaultSites[x].domain && !defaultSites[x].domain.match(/^(#options_|###$)/) && !sites_default.some(key => compareKey(key, x)));
for (let site_new of sites_new)
sites[site_new] = defaultSites[site_new].domain;
// reset ungrouped sites
let ungrouped_sites = {
'The Athletic': 'theathletic.com',
'The Toronto Star (+ local TorStar sites)': 'thestar.com'
};
for (let key in ungrouped_sites) {
if (sites[key] && sites[key] !== ungrouped_sites[key])
sites[key] = ungrouped_sites[key];
}
ext_api.storage.local.set({
sites: sites
});
@ -568,11 +577,6 @@ ext_api.storage.onChanged.addListener(function (changes, namespace) {
if (key === 'optInUpdate') {
optin_update = storageChange.newValue;
}
// Refresh the current tab
let refresh = (url_loc === 'chrome') || ((typeof storageChange.newValue === 'string') && (storageChange.newValue !== storageChange.oldValue)) || ((typeof storageChange.newValue === 'object') && (Object.keys(storageChange.newValue).length !== Object.keys(storageChange.oldValue).length));
if (refresh)
refreshCurrentTab();
}
});
@ -1240,7 +1244,7 @@ function site_switch() {
ext_api.storage.local.set({
sites: sites
}, function () {
true;
ext_api.tabs.reload({bypassCache: true});
});
});
}

@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Firefox
Updates (install signed xpi-file): https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/releases
Post-release
Maintenance request host permission (disable for mobile)
* v3.2.5.0 (2023-07-16)
Add El Tribuno (ar)

@ -51,5 +51,5 @@
"webRequestBlocking",
"*://*/*"
],
"version": "3.2.5.0"
"version": "3.2.5.1"
}

@ -754,5 +754,5 @@
"*://*.wyleex.com/*",
"*://webcache.googleusercontent.com/*"
],
"version": "3.2.5.0"
"version": "3.2.5.1"
}

@ -1,9 +1,11 @@
"use strict";
var ext_api = (typeof browser === 'object') ? browser : chrome;
var url_loc = (typeof browser === 'object') ? 'firefox' : 'chrome';
var manifestData = ext_api.runtime.getManifest();
var navigator_ua = navigator.userAgent;
var navigator_ua_mobile = navigator_ua.toLowerCase().includes('mobile');
var custom_switch = ((manifestData.optional_permissions && manifestData.optional_permissions.length) || (manifestData.optional_host_permissions && manifestData.optional_host_permissions.length)) && !navigator_ua_mobile;
var yandex_browser = navigator_ua_mobile && (url_loc === 'chrome') && navigator_ua.toLowerCase().includes('yabrowser');
var custom_switch = ((manifestData.optional_permissions && manifestData.optional_permissions.length) || (manifestData.optional_host_permissions && manifestData.optional_host_permissions.length)) && !(navigator_ua_mobile && !yandex_browser);
window.addEventListener("load", function () {
document.getElementById("button-close").addEventListener("click", function () {

@ -12,10 +12,10 @@
To add a new site, enter an unique title/domain (without www.).<br>
Select options below (<a href="https://gitlab.com/magnolia1234/bypass-paywalls-chrome-clean#add-custom-site" target="_blank">see GitLab help</a>); for examples import from GitLab.<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 blocked 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>
If you want to use custom sites (for unisted 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>
You can also just request permissions for the custom sites & post-release added sites (below).<br>
If permission is missing the icon badge will contain a 'C' (or '+C' if you can import the custom site from GitLab; when no fix X).
You can also just request host permissions for the custom sites & post-release added sites (below).<br>
If host permission is missing the icon badge will contain a 'C' (or '+C' if you can import the custom site from GitLab; when no fix X).
<br><br>
</div>
<div id='add_site'></div>

@ -1,5 +1,10 @@
var ext_api = chrome || browser;
var url_loc = (typeof browser === 'object') ? 'firefox' : 'chrome';
var manifestData = ext_api.runtime.getManifest();
var navigator_ua = navigator.userAgent;
var navigator_ua_mobile = navigator_ua.toLowerCase().includes('mobile');
var yandex_browser = navigator_ua_mobile && (url_loc === 'chrome') && navigator_ua.toLowerCase().includes('yabrowser');
var custom_switch = ((manifestData.optional_permissions && manifestData.optional_permissions.length) || (manifestData.optional_host_permissions && manifestData.optional_host_permissions.length)) && !(navigator_ua_mobile && !yandex_browser);
var useragent_options = ['', 'googlebot', 'bingbot', 'facebookbot'];
var referer_options = ['', 'facebook', 'google', 'twitter'];
@ -451,5 +456,7 @@ document.getElementById('import_gitlab').addEventListener('click', import_gitlab
document.getElementById('add').addEventListener('click', add_options);
document.getElementById('delete').addEventListener('click', delete_options);
document.getElementById('edit').addEventListener('click', edit_options);
document.getElementById('perm_request').addEventListener('click', request_permissions);
document.getElementById('perm_remove').addEventListener('click', remove_permissions);
if (custom_switch) {
document.getElementById('perm_request').addEventListener('click', request_permissions);
document.getElementById('perm_remove').addEventListener('click', remove_permissions);
}

@ -1,8 +1,10 @@
var ext_api = (typeof browser === 'object') ? browser : chrome;
var url_loc = (typeof browser === 'object') ? 'firefox' : 'chrome';
var manifestData = ext_api.runtime.getManifest();
var navigator_ua = navigator.userAgent;
var navigator_ua_mobile = navigator_ua.toLowerCase().includes('mobile');
var custom_switch = ((manifestData.optional_permissions && manifestData.optional_permissions.length) || (manifestData.optional_host_permissions && manifestData.optional_host_permissions.length)) && !navigator_ua_mobile;
var yandex_browser = navigator_ua_mobile && (url_loc === 'chrome') && navigator_ua.toLowerCase().includes('yabrowser');
var custom_switch = ((manifestData.optional_permissions && manifestData.optional_permissions.length) || (manifestData.optional_host_permissions && manifestData.optional_host_permissions.length)) && !(navigator_ua_mobile && !yandex_browser);
function popup_show_toggle(domain, enabled) {
if (domain) {

Loading…
Cancel
Save