Default limited permissions (opt-in custom sites)

This commit is contained in:
magnolia1234 2020-10-13 17:10:56 +02:00
parent b93d2d8c74
commit 8935894a3d
12 changed files with 439 additions and 75 deletions

View File

@ -18,7 +18,7 @@ In extension developer mode you can always install BPC by `Load unpacked` (no au
1. Download this repository as a [ZIP-file from BitBucket](https://bitbucket.org/magnolia1234/bypass-paywalls-chrome-clean/get/master.zip). 1. Download this repository as a [ZIP-file from BitBucket](https://bitbucket.org/magnolia1234/bypass-paywalls-chrome-clean/get/master.zip).
2. Unzip the file and you should have a folder named `magnolia1234-bypass-paywalls-chrome-clean-(commit-hash)`. 2. Unzip the file and you should have a folder named `magnolia1234-bypass-paywalls-chrome-clean-(commit-hash)`.
3. Move the folder to a permanent location on your computer (do not delete the folder after installation). 3. Move the folder to a permanent location on your computer (do not delete the folder after installation).
* replace manifest.json with the one in lp-folder if you want to use the limited permissions version (custom sites will not be working though). * by default BPC has limited permissions, but you can opt-in to enable custom sites (and also clear cookies for non-listed sites).
4. Go to the extensions page (`chrome://extensions` or `edge://extensions`). 4. Go to the extensions page (`chrome://extensions` or `edge://extensions`).
5. Enable Developer Mode. 5. Enable Developer Mode.
6. Click `Load unpacked` and select the extension folder. 6. Click `Load unpacked` and select the extension folder.
@ -123,7 +123,7 @@ Visit the [Firefox repository](https://bitbucket.org/magnolia1234/bypass-paywall
##### Magazines/Blogs ##### Magazines/Blogs
[Atavist Magazine](https://magazine.atavist.com) - [Atavist Magazine](https://magazine.atavist.com) -
[Commentary Magazine](https://www.commentarymagazine.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) - [Rolling Stone](https://www.rollingstone.com) -
[Slate](https://slate.com) - [Slate](https://slate.com) -
[SofRep](https://sofrep.com) - [SofRep](https://sofrep.com) -
@ -364,7 +364,7 @@ _*free articles only._
### Sites with limited number of free articles ### Sites with limited number of free articles
The free article limit can normally be bypassed by removing cookies for the site. 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: For user with the limited permissions BPC-version this will only work for supported sites; for other sites use:
1. Install the extension [Cookie Remover](https://chrome.google.com/webstore/detail/cookie-remover/kcgpggonjhmeaejebeoeomdlohicfhce) or [Disable Cookies](https://chrome.google.com/webstore/detail/disable-cookies/lkmjmficaoifggpfapbffkggecbleang?hl=en). 1. Install the extension [Cookie Remover](https://chrome.google.com/webstore/detail/cookie-remover/kcgpggonjhmeaejebeoeomdlohicfhce) or [Disable Cookies](https://chrome.google.com/webstore/detail/disable-cookies/lkmjmficaoifggpfapbffkggecbleang?hl=en).
2. When coming across a paywall, click the cookie icon in your extension toolbar then refresh the page. 2. When coming across a paywall, click the cookie icon in your extension toolbar then refresh the page.
@ -384,6 +384,8 @@ Remember to check the [previous requests](https://bitbucket.org/magnolia1234/byp
### Add custom site ### Add custom site
Add your own custom site (also for testing). Add your own custom site (also for testing).
Check 'Options'-link in popup-menu and go to custom sites. 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 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). 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. Also you can enable Googlebot user-agent or disable Javascript for (sub)domain(s)/external sources.

View File

@ -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. // show the tab if we haven't registered the user reacting to the prompt.
ext_api.storage.sync.get("optInShown", function (result) { ext_api.storage.sync.get(["optInShown", "customShown"], function (result) {
if (!result.optInShown) { if (!result.optInShown || !result.customShown) {
ext_api.tabs.create({ ext_api.tabs.create({
url: "optin/opt-in.html" url: "optin/opt-in.html"
}); });

View File

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

View File

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

View File

@ -1,25 +1,29 @@
{ {
"background": { "background": {
"scripts": ["sites.js", "bpc_count_daily_users.js", "background.js"] "scripts": ["sites.js", "bpc_count_daily_users.js", "background.js"]
}, },
"content_security_policy": "script-src 'self'; object-src 'self'", "content_security_policy": "script-src 'self'; object-src 'self'",
"browser_action": { "browser_action": {
"default_popup": "popup.html" "default_popup": "popup.html"
}, },
"description": "Bypass Paywalls of news sites", "description": "Bypass Paywalls of news sites",
"homepage_url": "https://bitbucket.org/magnolia1234/bypass-paywalls-chrome-clean/src/master/README.md", "homepage_url": "https://bitbucket.org/magnolia1234/bypass-paywalls-chrome-clean/src/master/README.md",
"icons": { "icons": {
"128": "bypass.png" "128": "bypass.png"
}, },
"manifest_version": 2, "manifest_version": 2,
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvLxf4oOeSoz8qKVzKGQWW5zW44hWCoOoQRGXTrObUpyoGfGzhFO8aZHQmBcLrAZMA4O6EA7GaXnHkOPCLKM11seZ4J2azb1gSswApfAlaoeOLnhDnp/Jpzz7Bt6o4HL+nhKRJUOZ9z+GXAyOkOps5O38TwJN5R6z8tLkleRgfYscp19YU/vq1x9PrbXIHJTRB7qtb/iJmiKATKisXGmFY3Nbs5m379TGqcJFBM9bI+8bSJtS4e7t0LHOwSLDq3IVRaWVsFd9P19WEDNTxuzr9+rczOrw1vgmiisNOcElse8cyVIoq4bjepvfHM/9nzDgKwQsNG5OTzujwHu2UUN4cwIDAQAB", "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvLxf4oOeSoz8qKVzKGQWW5zW44hWCoOoQRGXTrObUpyoGfGzhFO8aZHQmBcLrAZMA4O6EA7GaXnHkOPCLKM11seZ4J2azb1gSswApfAlaoeOLnhDnp/Jpzz7Bt6o4HL+nhKRJUOZ9z+GXAyOkOps5O38TwJN5R6z8tLkleRgfYscp19YU/vq1x9PrbXIHJTRB7qtb/iJmiKATKisXGmFY3Nbs5m379TGqcJFBM9bI+8bSJtS4e7t0LHOwSLDq3IVRaWVsFd9P19WEDNTxuzr9+rczOrw1vgmiisNOcElse8cyVIoq4bjepvfHM/9nzDgKwQsNG5OTzujwHu2UUN4cwIDAQAB",
"name": "Bypass Paywalls Clean (limited permissions)", "name": "Bypass Paywalls Clean (lp - no more updates)",
"update_url": "https://bitbucket.org/magnolia1234/bypass-paywalls-chrome-clean/raw/master/updates_lp.xml", "update_url": "https://bitbucket.org/magnolia1234/bypass-paywalls-chrome-clean/raw/master/updates_lp.xml",
"short_name": "Bypass Paywall", "short_name": "Bypass Paywall",
"options_ui": { "options_ui": {
"chrome_style": true, "chrome_style": true,
"page": "options.html" "open_in_tab": true,
}, "page": "options.html"
},
"optional_permissions": [
"<all_urls>"
],
"permissions": [ "permissions": [
"cookies", "cookies",
"*://*.abc.es/*", "*://*.abc.es/*",
@ -305,5 +309,5 @@
"webRequest", "webRequest",
"webRequestBlocking" "webRequestBlocking"
], ],
"version": "1.9.0.1" "version": "1.9.0.2"
} }

View File

@ -1,25 +1,313 @@
{ {
"background": { "background": {
"scripts": ["sites.js", "bpc_count_daily_users.js", "background.js"] "scripts": ["sites.js", "bpc_count_daily_users.js", "background.js"]
}, },
"content_security_policy": "script-src 'self'; object-src 'self'", "content_security_policy": "script-src 'self'; object-src 'self'",
"browser_action": { "browser_action": {
"default_popup": "popup.html" "default_popup": "popup.html"
}, },
"description": "Bypass Paywalls of news sites", "description": "Bypass Paywalls of news sites",
"homepage_url": "https://bitbucket.org/magnolia1234/bypass-paywalls-chrome-clean/src/master/README.md", "homepage_url": "https://bitbucket.org/magnolia1234/bypass-paywalls-chrome-clean/src/master/README.md",
"icons": { "icons": {
"128": "bypass.png" "128": "bypass.png"
}, },
"manifest_version": 2, "manifest_version": 2,
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvLxf4oOeSoz8qKVzKGQWW5zW44hWCoOoQRGXTrObUpyoGfGzhFO8aZHQmBcLrAZMA4O6EA7GaXnHkOPCLKM11seZ4J2azb1gSswApfAlaoeOLnhDnp/Jpzz7Bt6o4HL+nhKRJUOZ9z+GXAyOkOps5O38TwJN5R6z8tLkleRgfYscp19YU/vq1x9PrbXIHJTRB7qtb/iJmiKATKisXGmFY3Nbs5m379TGqcJFBM9bI+8bSJtS4e7t0LHOwSLDq3IVRaWVsFd9P19WEDNTxuzr9+rczOrw1vgmiisNOcElse8cyVIoq4bjepvfHM/9nzDgKwQsNG5OTzujwHu2UUN4cwIDAQAB", "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvLxf4oOeSoz8qKVzKGQWW5zW44hWCoOoQRGXTrObUpyoGfGzhFO8aZHQmBcLrAZMA4O6EA7GaXnHkOPCLKM11seZ4J2azb1gSswApfAlaoeOLnhDnp/Jpzz7Bt6o4HL+nhKRJUOZ9z+GXAyOkOps5O38TwJN5R6z8tLkleRgfYscp19YU/vq1x9PrbXIHJTRB7qtb/iJmiKATKisXGmFY3Nbs5m379TGqcJFBM9bI+8bSJtS4e7t0LHOwSLDq3IVRaWVsFd9P19WEDNTxuzr9+rczOrw1vgmiisNOcElse8cyVIoq4bjepvfHM/9nzDgKwQsNG5OTzujwHu2UUN4cwIDAQAB",
"name": "Bypass Paywalls Clean", "name": "Bypass Paywalls Clean",
"update_url": "https://bitbucket.org/magnolia1234/bypass-paywalls-chrome-clean/raw/master/updates.xml", "update_url": "https://bitbucket.org/magnolia1234/bypass-paywalls-chrome-clean/raw/master/updates.xml",
"short_name": "Bypass Paywall", "short_name": "Bypass Paywall",
"options_ui": { "options_ui": {
"chrome_style": true, "chrome_style": true,
"page": "options.html" "open_in_tab": true,
}, "page": "options.html"
"permissions": [ "cookies", "<all_urls>", "storage", "webRequest", "webRequestBlocking"], },
"version": "1.9.0.1" "optional_permissions": [
"<all_urls>"
],
"permissions": [
"cookies",
"*://*.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",
"webRequest",
"webRequestBlocking"
],
"version": "1.9.0.2"
} }

View File

@ -3,28 +3,41 @@
<html> <html>
<head> <head>
<meta charset="utf-8"> <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"/> <link rel="stylesheet" href="opt-in.css"/>
<script src="opt-in.js"></script> <script src="opt-in.js"></script>
</head> </head>
<body> <body>
<div id="opt-in-prompt"> <div id="opt-in-prompt">
<p><strong>Bypass Paywalls Clean (setCookie opt-in)</strong></p> <p><strong>Bypass Paywalls Clean<br> - setCookie/custom sites 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> <p><strong>setCookie opt-in</strong></p>
Australian Provincial Newspapers</br> <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>
Boston Globe</br> Australian Provincial Newspapers<br/>
Irish Independent</br> Boston Globe<br>
Irish Independent<br>
The Belfast Telegraph</p> The Belfast Telegraph</p>
<p>SetCookie opt-in enabled: <span id="opt-in-enabled"></span></p> <p>setCookie opt-in enabled: <span id="opt-in-enabled"></span></p>
<div id="button-container"> <div id="optin-container">
<button id="button-enable">Enable</button> <button id="button-enable">Enable</button>
<button id="button-cancel" autofocus="true">Disable</button> <button id="button-cancel" autofocus="true">Disable</button>
</div> </div>
</div> </div>
<div id="after-opt-in" hidden="true"> <div id="custom-prompt">
<p>Do something else.</p> <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> </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> </body>
</html> </html>

View File

@ -16,7 +16,7 @@ window.addEventListener("load", function () {
}); });
opt_in_enabled.innerText = 'YES'; opt_in_enabled.innerText = 'YES';
setTimeout(function () { setTimeout(function () {
window.close(); //window.close();
}, 800); }, 800);
}); });
@ -29,7 +29,46 @@ window.addEventListener("load", function () {
}); });
opt_in_enabled.innerText = 'NO'; opt_in_enabled.innerText = 'NO';
setTimeout(function () { setTimeout(function () {
window.close(); //window.close();
}, 800); }, 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
});
});
});
}); });

View File

@ -18,19 +18,19 @@
<br><a href="https://bitbucket.org/magnolia1234/bypass-paywalls-chrome-clean/raw/master/changelog.txt" style="color:black" target="_blank">Changelog</a> <br><a href="https://bitbucket.org/magnolia1234/bypass-paywalls-chrome-clean/raw/master/changelog.txt" style="color:black" target="_blank">Changelog</a>
<div style="width:90%;"> <div style="width:90%;">
Selected sites will have their cookies cleared and referer set to Google. 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. For some sites (check list) a necessary cookie has to be set; enable in opt-in.
</div> </div>
<br/> <br>
<div style='float:left'> <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="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="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>
<div style="clear:both;"></div> <div style="clear:both;"></div>
<br> <br>
<div id='bypass_sites'></div> <div id='bypass_sites'></div>
<br/> <br>
<div id="status"></div> <div id="status"></div>
<div id="error"></div> <div id="error"></div>
<span style='float:left;padding-bottom:50px'> <span style='float:left;padding-bottom:50px'>

View File

@ -17,11 +17,13 @@
<h2>Custom Sites</h2> <h2>Custom Sites</h2>
<div style="width:90%;"> <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> 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). 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>
<br/><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>
<div id='add_site'></div> <div id='add_site'></div>
<br/> <br>
<div id="status_add"></div> <div id="status_add"></div>
<span style='float:left;padding-bottom:5px'> <span style='float:left;padding-bottom:5px'>
<button id="add">Add</button> <button id="add">Add</button>
@ -30,10 +32,10 @@
<div> <div>
<h3>List of custom sites</h3> <h3>List of custom sites</h3>
* already in default list (double domain) * already in default list (double domain)
<br/> <br>
</div> </div>
<div id='custom_sites'></div> <div id='custom_sites'></div>
<br/> <br>
<div id="status_delete"></div> <div id="status_delete"></div>
<span style='float:left;padding-bottom:5px'> <span style='float:left;padding-bottom:5px'>
<button id="delete">Delete</button> <button id="delete">Delete</button>
@ -45,9 +47,9 @@
You can edit/sort the text area and save (only when json-text is valid). 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. Clear & save to reset. You can also export/import json-text for new installations.
</div> </div>
<br/> <br>
<div id='bypass_sites'></div> <div id='bypass_sites'></div>
<br/> <br>
<div id="status"></div> <div id="status"></div>
<div id="error"></div> <div id="error"></div>
<span style='float:left;padding-bottom:50px'> <span style='float:left;padding-bottom:50px'>

View File

@ -245,7 +245,17 @@ function renderOptions() {
} }
labelEl.appendChild(selectEl); labelEl.appendChild(selectEl);
custom_sitesEl.appendChild(labelEl); 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';
}
}); });
} }

View File

@ -21,6 +21,11 @@ fetch(manifest_new)
anchorEl.href = 'https://bitbucket.org/magnolia1234/bypass-paywalls-chrome-clean/downloads'; anchorEl.href = 'https://bitbucket.org/magnolia1234/bypass-paywalls-chrome-clean/downloads';
anchorEl.target = '_blank'; anchorEl.target = '_blank';
versionString_new.appendChild(anchorEl); 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);
}
} }
}); });
}) })