Default limited permissions (opt-in custom sites)

merge-requests/1/head
magnolia1234 4 years ago
parent 9c721e4ef4
commit 9bd832d44c

@ -10,8 +10,9 @@
* [License](#license)
### Installation
[Download and install the latest version](https://bitbucket.org/magnolia1234/bypass-paywalls-firefox-clean/downloads)
Here you can also find a limited permissions version (custom sites will not be working though).
You can install the add-on from Mozilla add-ons (AMO): [Bypass Paywalls Clean](https://addons.mozilla.org/en-US/firefox/addon/bypass-paywalls-clean)
Or download and install the latest version from [BitBucket](https://bitbucket.org/magnolia1234/bypass-paywalls-firefox-clean/downloads)
By default BPC has limited permissions, but you can opt-in to enable custom sites (and also clear cookies for non-listed sites).
Install add-on by downloading xpi-file.
On Android this add-on only works with Firefox 68 (Fennec); Firefox 79 (Fenix) only supports 9 add-ons (for now).
So don't update to Firefox 79 or use F-droid's [Fennec-release](https://f-droid.org/en/packages/org.mozilla.fennec_fdroid/)
@ -81,7 +82,7 @@ So don't update to Firefox 79 or use F-droid's [Fennec-release](https://f-droid.
##### Magazines/Blogs
[Atavist Magazine](https://magazine.atavist.com) -
[Commentary Magazine](https://www.commentarymagazine.com) -
[Medium](https://www.medium.com) (all sites) -
[Medium](https://www.medium.com/topics) (all sites) -
[Rolling Stone](https://www.rollingstone.com) -
[Slate](https://slate.com) -
[SofRep](https://sofrep.com) -
@ -322,7 +323,7 @@ _*free articles only._
### Sites with limited number of free articles
The free article limit can normally be bypassed by removing cookies for the site.
Click on the BPC-icon and then 'clear cookies' button in the popup.
Click on the BPC-icon and then 'clear cookies'-button in the popup.
For user with the limited permissions BPC-version this will only work for supported sites; for other sites use:
1. Install the add-on [Cookie Remover](https://addons.mozilla.org/en-US/firefox/addon/cookie-remover/).
2. When coming across a paywall click the cookie icon to remove the cookies then refresh the page.
@ -342,7 +343,8 @@ Remember to check the [previous requests](https://bitbucket.org/magnolia1234/byp
### Add custom site
Add your own custom site (also for testing).
Check 'Options'-link in popup-menu and go to custom sites.
Make sure the (new) site is checked under Options.
* by default BPC has limited permissions, but you can opt-in to enable custom sites (and also clear cookies for non-listed sites).
Make sure the (new) site is checked under Options (or check on/off-buton).
By default sites' cookies/local storage are removed after page loads (to bypass article limit).
Also you can enable Googlebot user-agent or disable Javascript for (sub)domain(s)/external sources.

@ -223,7 +223,7 @@ var blockedRegexes = {
'scmp.com': /.+\.tinypass\.com\/.+/,
'sfchronicle.com': /.+\.blueconic\.net\/.+/,
'slate.com': /(cdn\.cxense\.com|.+\.tinypass\.com\/.+)/,
'sloanreview.mit.edu': /(.+\.tinypass\.com\/.+|.+\.netdna-ssl\.com\/wp-content\/themes\/smr\/assets\/js\/libs\/welcome-ad\.js)/,
'sloanreview.mit.edu': /(.+\.tinypass\.com\/.+|.+\/sloanreview\.mit\.edu\/.+\/welcome-ad\.js)/,
'smh.com.au': /cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js/,
'spectator.co.uk': /.+\.tinypass\.com\/.+/,
'spectator.com.au': /.+\.tinypass\.com\/.+/,
@ -797,8 +797,8 @@ ext_api.runtime.onMessage.addListener(function (message, sender) {
});
// show the tab if we haven't registered the user reacting to the prompt.
ext_api.storage.sync.get("optInShown", function (result) {
if (!result.optInShown) {
ext_api.storage.sync.get(["optInShown", "customShown"], function (result) {
if (!result.optInShown || !result.customShown) {
ext_api.tabs.create({
url: "optin/opt-in.html"
});

@ -14,7 +14,7 @@ function bpc_count_daily_users(dateStr) {
true;
});
let count_json = 'https://bitbucket.org/magnolia1234/bpc-firefox-daily-users/downloads/bpc-daily-users-' + dateStr + '.json';
fetch(count_json);
fetch(count_json, {mode: 'no-cors'});
}
});
}

@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Firefox
Post-release
Fix-update MIT Sloan Management Review (modal)
Default limited permissions (opt-in custom sites)
Option to clear cookies & local storage (of site)
* v1.9.0.0 (2020-10-11)

@ -27,11 +27,16 @@
"128": "bypass.png"
},
"manifest_version": 2,
"name": "Bypass Paywalls Clean (limited permissions)",
"name": "Bypass Paywalls Clean (lp - no more updates)",
"short_name": "Bypass Paywall",
"options_ui": {
"browser_style": true,
"open_in_tab": true,
"page": "options.html"
},
"optional_permissions": [
"<all_urls>"
],
"permissions": [
"cookies",
"*://*.abc.es/*",
@ -318,5 +323,5 @@
"webRequest",
"webRequestBlocking"
],
"version": "1.9.0.1"
"version": "1.9.0.2"
}

@ -30,15 +30,298 @@
"name": "Bypass Paywalls Clean",
"short_name": "Bypass Paywall",
"options_ui": {
"browser_style": true,
"open_in_tab": true,
"page": "options.html"
},
"optional_permissions": [
"<all_urls>"
],
"permissions": [
"cookies",
"<all_urls>",
"*://*.abc.es/*",
"*://*.ad.nl/*",
"*://*.adelaidenow.com.au/*",
"*://*.adweek.com/*",
"*://*.afr.com/*",
"*://*.aftonbladet.se/*",
"*://*.americanaffairsjournal.org/*",
"*://*.americanbanker.com/*",
"*://*.asia.nikkei.com/*",
"*://*.atavist.com/*",
"*://*.baltimoresun.com/*",
"*://*.barrons.com/*",
"*://*.belfasttelegraph.co.uk/*",
"*://*.bendigoadvertiser.com.au/*",
"*://*.bizjournals.com/*",
"*://*.bloomberg.com/*",
"*://*.bloombergquint.com/*",
"*://*.bordermail.com.au/*",
"*://*.bostonglobe.com/*",
"*://*.brisbanetimes.com.au/*",
"*://*.britannica.com/*",
"*://*.business-standard.com/*",
"*://*.businessinsider.com/*",
"*://*.cairnspost.com.au/*",
"*://*.caixinglobal.com/*",
"*://*.canberratimes.com.au/*",
"*://*.cen.acs.org/*",
"*://*.centralwesterndaily.com.au/*",
"*://*.challenges.fr/*",
"*://*.charliehebdo.fr/*",
"*://*.chicagobusiness.com/*",
"*://*.chicagotribune.com/*",
"*://*.chronicle.com/*",
"*://*.clarin.com/*",
"*://*.commentarymagazine.com/*",
"*://*.corriere.it/*",
"*://*.courant.com/*",
"*://*.couriermail.com.au/*",
"*://*.csmonitor.com/*",
"*://*.cw.com.tw/*",
"*://*.dailyadvertiser.com.au/*",
"*://*.dailyexaminer.com.au/*",
"*://*.dailyliberal.com.au/*",
"*://*.dailymercury.com.au/*",
"*://*.dailypress.com/*",
"*://*.dailytelegraph.com.au/*",
"*://*.darkreading.com/*",
"*://*.demorgen.be/*",
"*://*.denverpost.com/*",
"*://*.df.cl/*",
"*://*.digiday.com/*",
"*://*.dn.se/*",
"*://*.dvhn.nl/*",
"*://*.economist.com/*",
"*://*.editorialedomani.it/*",
"*://*.elcomercio.pe/*",
"*://*.elmercurio.com/*",
"*://*.elmundo.es/*",
"*://*.elpais.com/*",
"*://*.estadao.com.br/*",
"*://*.eurekareport.com.au/*",
"*://*.exame.abril.com.br/*",
"*://*.examiner.com.au/*",
"*://*.faz.net/*",
"*://*.fd.nl/*",
"*://*.firstthings.com/*",
"*://*.fnlondon.com/*",
"*://*.folha.uol.com.br/*",
"*://*.foreignpolicy.com/*",
"*://*.fortune.com/*",
"*://*.frasercoastchronicle.com.au/*",
"*://*.fresnobee.com/*",
"*://*.ft.com/*",
"*://*.ftm.nl/*",
"*://*.geelongadvertiser.com.au/*",
"*://*.gestion.pe/*",
"*://*.gladstoneobserver.com.au/*",
"*://*.glassdoor.com/*",
"*://*.globes.co.il/*",
"*://*.globo.com/*",
"*://*.goldcoastbulletin.com.au/*",
"*://*.groene.nl/*",
"*://*.gympietimes.com.au/*",
"*://*.haaretz.co.il/*",
"*://*.haaretz.com/*",
"*://*.handelsblatt.com/*",
"*://*.harpers.org/*",
"*://*.haz.de/*",
"*://*.hbr.org/*",
"*://*.hbrtaiwan.com/*",
"*://*.heraldsun.com.au/*",
"*://*.historyextra.com/*",
"*://*.humo.be/*",
"*://*.ilfattoquotidiano.it/*",
"*://*.illawarramercury.com.au/*",
"*://*.ilmanifesto.it/*",
"*://*.ilmessaggero.it/*",
"*://*.inc.com/*",
"*://*.independent.ie/*",
"*://*.inkl.com/*",
"*://*.inquirer.com/*",
"*://*.intelligentinvestor.com.au/*",
"*://*.irishtimes.com/*",
"*://*.japantimes.co.jp/*",
"*://*.journaldunet.com/*",
"*://*.journalnow.com/*",
"*://*.knack.be/*",
"*://*.labusinessjournal.com/*",
"*://*.ladepeche.fr/*",
"*://*.lanacion.com.ar/*",
"*://*.lasegunda.com/*",
"*://*.lastampa.it/*",
"*://*.latercera.com/*",
"*://*.latimes.com/*",
"*://*.lc.nl/*",
"*://*.lecho.be/*",
"*://*.ledevoir.com/*",
"*://*.lejdd.fr/*",
"*://*.leparisien.fr/*",
"*://*.lescienze.it/*",
"*://*.lesechos.com/*",
"*://*.lesechos.fr/*",
"*://*.lesoir.be/*",
"*://*.liberation.fr/*",
"*://*.limesonline.com/*",
"*://*.livemint.com/*",
"*://*.loebclassics.com/*",
"*://*.lopinion.fr/*",
"*://*.lrb.co.uk/*",
"*://*.lvz.de/*",
"*://*.mcall.com/*",
"*://*.medium.com/*",
"*://*.mercuriovalpo.cl/*",
"*://*.mercurynews.com/*",
"*://*.mexiconewsdaily.com/*",
"*://*.miamiherald.com/*",
"*://*.modernhealthcare.com/*",
"*://*.mv-voice.com/*",
"*://*.nationalgeographic.com/*",
"*://*.nationalpost.com/*",
"*://*.nationalreview.com/*",
"*://*.nautil.us/*",
"*://*.newcastleherald.com.au/*",
"*://*.newrepublic.com/*",
"*://*.news-gazette.com/*",
"*://*.news-mail.com.au/*",
"*://*.newstatesman.com/*",
"*://*.newsweek.com/*",
"*://*.newyorker.com/*",
"*://*.nknews.org/*",
"*://*.noordhollandsdagblad.nl/*",
"*://*.northerndailyleader.com.au/*",
"*://*.northernstar.com.au/*",
"*://*.nrc.nl/*",
"*://*.nrz.de/*",
"*://*.ntnews.com.au/*",
"*://*.nymag.com/*",
"*://*.nytimes.com/*",
"*://*.nzherald.co.nz/*",
"*://*.nzz.ch/*",
"*://*.ocregister.com/*",
"*://*.orlandosentinel.com/*",
"*://*.paloaltoonline.com/*",
"*://*.parool.nl/*",
"*://*.philosophynow.org/*",
"*://*.portnews.com.au/*",
"*://*.post-gazette.com/*",
"*://*.qt.com.au/*",
"*://*.quora.com/*",
"*://*.qz.com/*",
"*://*.repubblica.it/*",
"*://*.republic.ru/*",
"*://*.rollingstone.com/*",
"*://*.sacbee.com/*",
"*://*.sandiegouniontribune.com/*",
"*://*.science-et-vie.com/*",
"*://*.sciencesetavenir.fr/*",
"*://*.scientificamerican.com/*",
"*://*.scmp.com/*",
"*://*.scribd.com/*",
"*://*.seattletimes.com/*",
"*://*.seekingalpha.com/*",
"*://*.sfchronicle.com/*",
"*://*.slader.com/*",
"*://*.slate.com/*",
"*://*.sloanreview.mit.edu/*",
"*://*.smh.com.au/*",
"*://*.sofrep.com/*",
"*://*.spectator.co.uk/*",
"*://*.spectator.com.au/*",
"*://*.standard.net.au/*",
"*://*.startribune.com/*",
"*://*.statista.com/*",
"*://*.stocknews.com/*",
"*://*.sueddeutsche.de/*",
"*://*.sun-sentinel.com/*",
"*://*.sunshinecoastdaily.com.au/*",
"*://*.techinasia.com/*",
"*://*.technologyreview.com/*",
"*://*.telegraaf.nl/*",
"*://*.telegraph.co.uk/*",
"*://*.the-american-interest.com/*",
"*://*.the-tls.co.uk/*",
"*://*.theadvocate.com.au/*",
"*://*.theage.com.au/*",
"*://*.theatlantic.com/*",
"*://*.theaustralian.com.au/*",
"*://*.thechronicle.com.au/*",
"*://*.thecourier.com.au/*",
"*://*.thedailybeast.com/*",
"*://*.thediplomat.com/*",
"*://*.theglobeandmail.com/*",
"*://*.thehindu.com/*",
"*://*.themarker.com/*",
"*://*.themercury.com.au/*",
"*://*.themorningbulletin.com.au/*",
"*://*.thenation.com/*",
"*://*.thesaturdaypaper.com.au/*",
"*://*.thestar.com/*",
"*://*.thetimes.co.uk/*",
"*://*.tijd.be/*",
"*://*.timeshighereducation.com/*",
"*://*.towardsdatascience.com/*",
"*://*.townsvillebulletin.com.au/*",
"*://*.trouw.nl/*",
"*://*.valeursactuelles.com/*",
"*://*.vanityfair.com/*",
"*://*.variety.com/*",
"*://*.volkskrant.nl/*",
"*://*.warwickdailynews.com.au/*",
"*://*.washingtonpost.com/*",
"*://*.watoday.com.au/*",
"*://*.waz.de/*",
"*://*.weeklytimesnow.com.au/*",
"*://*.westernadvocate.com.au/*",
"*://*.wired.com/*",
"*://*.worldpoliticsreview.com/*",
"*://*.wp.de/*",
"*://*.wr.de/*",
"*://*.wsj.com/*",
"*://*.zeit.de/*",
"*://*.apnarm.net.au/*",
"*://*.blueconic.net/*",
"*://*.matheranalytics.com/*",
"*://*.onecount.net/*",
"*://*.piano.io/*",
"*://*.poool.fr/*",
"*://*.qiota.com/*",
"*://*.tinypass.com/*",
"*://*.tribdss.com/*",
"*://*.ampproject.org/*",
"*://*.bwbx.io/*",
"*://*.cedsdigital.it/*",
"*://*.corriereobjects.it/*",
"*://*.ctfassets.net/*",
"*://*.cxense.com/*",
"*://*.emol.cl/*",
"*://*.epimg.net/*",
"*://*.evolok.net/*",
"*://*.flip-pay.com/*",
"*://*.googletagmanager.com/*",
"*://*.htmedia.in/*",
"*://*.jsdelivr.net/*",
"*://*.lightboxcdn.com/*",
"*://*.lp4.io/*",
"*://*.nyt.com/*",
"*://*.pasedigital.cl/*",
"*://*.pelcro.com/*",
"*://*.rcsobjects.it/*",
"*://*.repstatic.it/*",
"*://*.userzoom.com/*",
"*://*.viralize.tv/*",
"*://*.bndestem.nl/*",
"*://*.bd.nl/*",
"*://*.ed.nl/*",
"*://*.gelderlander.nl/*",
"*://*.pzc.nl/*",
"*://*.destentor.nl/*",
"*://*.tubantia.nl/*",
"storage",
"tabs",
"webRequest",
"webRequestBlocking"
],
"version": "1.9.0.1"
"version": "1.9.0.2"
}

@ -3,28 +3,41 @@
<html>
<head>
<meta charset="utf-8">
<title>Bypass Paywalls Clean (setCookie opt-in)</title>
<title>Bypass Paywalls Clean (setCookie/custom sites opt-in)</title>
<link rel="stylesheet" href="opt-in.css"/>
<script src="opt-in.js"></script>
</head>
<body>
<div id="opt-in-prompt">
<p><strong>Bypass Paywalls Clean (setCookie opt-in)</strong></p>
<p>For some sites (check list in options) a necessary cookie has to be set (this cookie doesn't contain any personal information about the user or device):</br></br>
Australian Provincial Newspapers</br>
Boston Globe</br>
Irish Independent</br>
<p><strong>Bypass Paywalls Clean<br> - setCookie/custom sites opt-in</strong></p>
<p><strong>setCookie opt-in</strong></p>
<p>For some sites (check list in options) a necessary cookie has to be set (this cookie doesn't contain any personal information about the user or device):<br><br>
Australian Provincial Newspapers<br/>
Boston Globe<br>
Irish Independent<br>
The Belfast Telegraph</p>
<p>SetCookie opt-in enabled: <span id="opt-in-enabled"></span></p>
<div id="button-container">
<p>setCookie opt-in enabled: <span id="opt-in-enabled"></span></p>
<div id="optin-container">
<button id="button-enable">Enable</button>
<button id="button-cancel" autofocus="true">Disable</button>
</div>
</div>
<div id="after-opt-in" hidden="true">
<p>Do something else.</p>
<div id="custom-prompt">
<p><strong>custom sites opt-in</strong></p>
<p>If you want to enable custom sites and also the option to remove cookies for 'non-listed' sites:</br>
<p>custom sites enabled: <span id="custom-enabled"></span></p>
<div id="custom-container">
<button id="custom-enable">Enable</button>
<button id="custom-disable">Disable</button>
</div>
</div>
<p>
<div style='float:right'>
<small><button><a href="../options.html" style="text-decoration:none;color:inherit">Options</a></button></small>
<small><button><a href="../options_custom.html" style="text-decoration:none;color:inherit">Custom sites</a></button></small>
</div>
</p>
</body>
</html>

@ -16,7 +16,7 @@ window.addEventListener("load", function () {
});
opt_in_enabled.innerText = 'YES';
setTimeout(function () {
window.close();
//window.close();
}, 800);
});
@ -29,7 +29,46 @@ window.addEventListener("load", function () {
});
opt_in_enabled.innerText = 'NO';
setTimeout(function () {
window.close();
//window.close();
}, 800);
});
var custom_enabled = document.getElementById('custom-enabled');
ext_api.permissions.contains({
origins: ["<all_urls>"]
}, function (result) {
if (result) {
custom_enabled.innerText = 'YES';
} else {
custom_enabled.innerText = 'NO';
}
});
document.querySelector('#custom-enable').addEventListener('click', function (event) {
ext_api.permissions.request({
origins: ["<all_urls>"]
}, function (granted) {
if (granted) {
custom_enabled.innerText = 'YES';
} else {
custom_enabled.innerText = 'NO';
}
ext_api.storage.sync.set({
"customShown": true
});
});
});
document.querySelector('#custom-disable').addEventListener('click', function (event) {
ext_api.permissions.remove({
origins: ["<all_urls>"]
}, function (removed) {
if (removed) {
custom_enabled.innerText = 'NO';
} else {}
ext_api.storage.sync.set({
"customShown": true
});
});
});
});

@ -18,19 +18,19 @@
<br><a href="https://bitbucket.org/magnolia1234/bypass-paywalls-firefox-clean/raw/master/changelog.txt" style="color:black" target="_blank">Changelog</a>
<div style="width:90%;">
Selected sites will have their cookies cleared and referer set to Google.
You should uncheck sites you have an account with or else you will be logged out at every visit.</br>
You should uncheck sites you have an account with or else you will be logged out at every visit.<br>
For some sites (check list) a necessary cookie has to be set; enable in opt-in.
</div>
<br/>
<br>
<div style='float:left'>
<small><button><a href="options_custom.html" style="text-decoration:none;color:inherit">Custom sites</a></button></small>
<small><button><a href="optin/opt-in.html" style="text-decoration:none;color:inherit">Opt-in</a></button></small>
<small><button><a href="options.html#save" style="text-decoration:none;color:inherit">Go to save</a></button></small>
<small><button><a href="#save" style="text-decoration:none;color:inherit">Go to save</a></button></small>
</div>
<div style="clear:both;"></div>
<br>
<div id='bypass_sites'></div>
<br/>
<br>
<div id="status"></div>
<div id="error"></div>
<span style='float:left;padding-bottom:50px'>

@ -17,11 +17,13 @@
<h2>Custom Sites</h2>
<div style="width:90%;">
To add a new site, enter an unique title/domain (without www.) and select options for Googlebot/block Javascript (block on (sub)domain(s) of site and/or external domains).<br>
Custom sites are enabled automatically in <a href="options.html" style="color:black">options</a> (cookies will be removed by default).
<br/><br/>
Custom sites 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).<br>
If you want to use custom sites enable it in <small><button><a href="optin/opt-in.html" style="text-decoration:none;color:inherit">Opt-in</a></button></small><br>
<strong>Custom sites enabled: <span id="custom-enabled"></span></strong>
<br><br>
</div>
<div id='add_site'></div>
<br/>
<br>
<div id="status_add"></div>
<span style='float:left;padding-bottom:5px'>
<button id="add">Add</button>
@ -30,10 +32,10 @@
<div>
<h3>List of custom sites</h3>
* already in default list (double domain)
<br/>
<br>
</div>
<div id='custom_sites'></div>
<br/>
<br>
<div id="status_delete"></div>
<span style='float:left;padding-bottom:5px'>
<button id="delete">Delete</button>
@ -45,9 +47,9 @@
You can edit/sort the text area and save (only when json-text is valid).
Clear & save to reset. You can also export/import json-text for new installations.
</div>
<br/>
<br>
<div id='bypass_sites'></div>
<br/>
<br>
<div id="status"></div>
<div id="error"></div>
<span style='float:left;padding-bottom:50px'>

@ -245,7 +245,17 @@ function renderOptions() {
}
labelEl.appendChild(selectEl);
custom_sitesEl.appendChild(labelEl);
});
var custom_enabled = document.getElementById('custom-enabled');
ext_api.permissions.contains({
origins: ["<all_urls>"]
}, function (result) {
if (result) {
custom_enabled.innerText = 'YES';
} else {
custom_enabled.innerText = 'NO';
}
});
}

@ -21,6 +21,11 @@ fetch(manifest_new)
anchorEl.href = 'https://bitbucket.org/magnolia1234/bypass-paywalls-firefox-clean/downloads';
anchorEl.target = '_blank';
versionString_new.appendChild(anchorEl);
if (!manifestData.name.includes('Clean')) {
let par = document.createElement('p');
par.innerHTML = "<strong>You've installed a fake version of BPC (check BitBucket)</strong>";
versionString_new.appendChild(par);
}
}
});
})

Loading…
Cancel
Save