Skip to content
This repository has been archived by the owner on Jul 26, 2020. It is now read-only.

Commit

Permalink
looks like changing the permissions prompts the user to upgrade each …
Browse files Browse the repository at this point in the history
…time
  • Loading branch information
nextgens committed Dec 13, 2017
1 parent 3c84256 commit c6cd7b8
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 63 deletions.
66 changes: 64 additions & 2 deletions background.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,65 @@
const websites = [
"*://*.adelaidenow.com.au/*",
"*://*.baltimoresun.com/*",
"*://*.barrons.com/*",
"*://*.chicagobusiness.com/*",
"*://*.chicagotribune.com/*",
"*://*.chip.de/*",
"*://*.clarin.com/*",
"*://*.courant.com/*",
"*://*.couriermail.com.au/*",
"*://*.cricketarchive.com/*",
"*://*.dailypress.com/*",
"*://*.durangoherald.com/*",
"*://*.economist.com/*",
"*://*.fd.nl/*",
"*://*.forbes.com/*",
"*://*.ft.com/*",
"*://*.geelongadvertiser.com.au/*",
"*://*.haaretz.co.il/*",
"*://*.haaretz.com/*",
"*://*.hbr.org/*",
"*://*.heraldsun.com.au/*",
"*://*.inc.com/*",
"*://*.independent.co.uk/*",
"*://*.investingdaily.com/*",
"*://*.irishtimes.com/*",
"*://*.kansas.com/*",
"*://*.kansascity.com/*",
"*://*.latimes.com/*",
"*://*.lanacion.com.ar/*",
"*://*.letemps.ch/*",
"*://*.mcall.com/*",
"*://*.medscape.com/*",
"*://*.nationalpost.com/*",
"*://*.newsweek.com/*",
"*://*.newyorker.com/*",
"*://*.nikkei.com/*",
"*://*.nrc.nl/*",
"*://*.nyt.com/*",
"*://*.nytimes.com/*",
"*://*.ocregister.com/*",
"*://*.orlandosentinel.com/*",
"*://*.quora.com/*",
"*://*.scmp.com/*",
"*://*.seattletimes.com/*",
"*://*.slashdot.org/*",
"*://*.smh.com.au/*",
"*://*.sun-sentinel.com/*",
"*://*.technologyreview.com/*",
"*://*.theage.com.au/*",
"*://*.theaustralian.com.au/*",
"*://*.theglobeandmail.com/*",
"*://*.thenation.com/*",
"*://*.thestreet.com/*",
"*://*.thesundaytimes.co.uk/*",
"*://*.thetimes.co.uk/*",
"*://*.volkskrant.nl/*",
"*://*.washingtonpost.com/*",
"*://*.wsj.com/*",
"*://*.wsj.net/*"
]

const cookies = ([
// theaustralian.com.au
'open_token=anonymous',
Expand Down Expand Up @@ -62,11 +124,11 @@ function blockCookies(details) {
}

chrome.webRequest.onBeforeSendHeaders.addListener(evadePaywalls, {
urls: ["<all_urls>"],
urls: [...websites],
types: ["main_frame", "script"],
}, ["requestHeaders", "blocking"]);

chrome.webRequest.onHeadersReceived.addListener(blockCookies, {
urls: ["<all_urls>"],
urls: [...websites],
types: ["main_frame", "script"],
}, ["responseHeaders", "blocking"]);
62 changes: 1 addition & 61 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,67 +2,7 @@
"name": "Anti-Paywall",
"version": "0.6",
"description": "This extension will mangle your browser's requests to maximize the chances of bypassing paywalls.",
"permissions": ["webRequest", "webRequestBlocking",
"*://*.adelaidenow.com.au/*",
"*://*.baltimoresun.com/*",
"*://*.barrons.com/*",
"*://*.chicagobusiness.com/*",
"*://*.chicagotribune.com/*",
"*://*.chip.de/*",
"*://*.clarin.com/*",
"*://*.courant.com/*",
"*://*.couriermail.com.au/*",
"*://*.cricketarchive.com/*",
"*://*.dailypress.com/*",
"*://*.durangoherald.com/*",
"*://*.economist.com/*",
"*://*.fd.nl/*",
"*://*.forbes.com/*",
"*://*.ft.com/*",
"*://*.geelongadvertiser.com.au/*",
"*://*.haaretz.co.il/*",
"*://*.haaretz.com/*",
"*://*.hbr.org/*",
"*://*.heraldsun.com.au/*",
"*://*.inc.com/*",
"*://*.independent.co.uk/*",
"*://*.investingdaily.com/*",
"*://*.irishtimes.com/*",
"*://*.kansas.com/*",
"*://*.kansascity.com/*",
"*://*.latimes.com/*",
"*://*.lanacion.com.ar/*",
"*://*.letemps.ch/*",
"*://*.mcall.com/*",
"*://*.medscape.com/*",
"*://*.nationalpost.com/*",
"*://*.newsweek.com/*",
"*://*.newyorker.com/*",
"*://*.nikkei.com/*",
"*://*.nrc.nl/*",
"*://*.nyt.com/*",
"*://*.nytimes.com/*",
"*://*.ocregister.com/*",
"*://*.orlandosentinel.com/*",
"*://*.quora.com/*",
"*://*.scmp.com/*",
"*://*.seattletimes.com/*",
"*://*.slashdot.org/*",
"*://*.smh.com.au/*",
"*://*.sun-sentinel.com/*",
"*://*.technologyreview.com/*",
"*://*.theage.com.au/*",
"*://*.theaustralian.com.au/*",
"*://*.theglobeandmail.com/*",
"*://*.thenation.com/*",
"*://*.thestreet.com/*",
"*://*.thesundaytimes.co.uk/*",
"*://*.thetimes.co.uk/*",
"*://*.volkskrant.nl/*",
"*://*.washingtonpost.com/*",
"*://*.wsj.com/*",
"*://*.wsj.net/*"
],
"permissions": ["webRequest", "webRequestBlocking", "*://*/*"],
"background": {
"scripts": ["background.js"]
},
Expand Down

0 comments on commit c6cd7b8

Please sign in to comment.