Merge branch 'master' into ft-cookie-banner
commit
43555590f1
18
README.md
18
README.md
|
@ -31,6 +31,7 @@
|
|||
[De Volkskrant](https://www.volkskrant.nl)\
|
||||
[DeMorgen](https://demorgen.be)\
|
||||
[Denver Post](https://www.denverpost.com)\
|
||||
[Die Zeit](https://www.zeit.de)\
|
||||
[Dynamed Plus](https://dynamed.com)\
|
||||
[Eindhovens Dagblad](https://ed.nl)\
|
||||
[Encyclopedia Britannica](https://britannica.com)\
|
||||
|
@ -46,13 +47,14 @@
|
|||
[Hartford Courant](https://www.courant.com)\
|
||||
[Harvard Business Review](https://www.hbr.org)\
|
||||
[Inc.com](https://www.inc.com)\
|
||||
[Irish Times](https://www.irishtimes.com)\
|
||||
[L.A. Business Journal](https://labusinessjournal.com)\
|
||||
[La Nación](https://www.lanacion.com.ar)\
|
||||
[La Repubblica](https://www.repubblica.it)\
|
||||
[La Tercera](https://latercera.com)\
|
||||
[L'Écho](https://lecho.be)\
|
||||
[Le Devoir](https://www.ledevoir.com)\
|
||||
[Le Monde](https://www.lemonde.fr)\
|
||||
[Le Parisien](http://www.leparisien.fr)\
|
||||
[Les Échos](https://lesechos.fr)\
|
||||
[Libération](https://liberation.fr)\
|
||||
[Loeb Classical Library](https://www.loebclassics.com)\
|
||||
|
@ -61,7 +63,7 @@
|
|||
[MIT Technology Review](https://www.technologyreview.com)\
|
||||
[Medium](https://www.medium.com)\
|
||||
[Mexicon News Daily](https://mexiconewsdaily.com)\
|
||||
[NRC](https://www.nrc.nl)\
|
||||
[NRC Handelsblad](https://www.nrc.nl)\
|
||||
[New York Magazine](https://www.nymag.com)\
|
||||
[New Zealand Herald](https://www.nzherald.co.nz)\
|
||||
[Newsrep](https://thenewsrep.com)\
|
||||
|
@ -84,8 +86,11 @@
|
|||
[The Australian](https://www.theaustralian.com.au)\
|
||||
[The Boston Globe](https://www.bostonglobe.com)\
|
||||
[The Business Journals](https://www.bizjournals.com)\
|
||||
[The Canberra Times](https://www.canberratimes.com.au)\
|
||||
[The Economist](https://www.economist.com)\
|
||||
[The Globe and Mail](https://www.theglobeandmail.com)\
|
||||
[The Hindu](https://www.thehindu.com)\
|
||||
[The Irish Times](https://www.irishtimes.com)\
|
||||
[The Japan Times](https://www.japantimes.co.jp)\
|
||||
[The Mercury News](https://www.mercurynews.com)\
|
||||
[The Morning Call](https://www.mcall.com)\
|
||||
|
@ -94,7 +99,7 @@
|
|||
[The New York Times](https://www.nytimes.com)\
|
||||
[The New Yorker](https://www.newyorker.com)\
|
||||
[The News-Gazette](https://www.news-gazette.com)\
|
||||
[The Philadelphia Inquirer](inquirer.com)\
|
||||
[The Philadelphia Inquirer](https://inquirer.com)\
|
||||
[The Seattle Times](https://www.seattletimes.com)\
|
||||
[The Spectator](https://www.spectator.co.uk)\
|
||||
[The Sydney Morning Herald](https://www.smh.com.au)\
|
||||
|
@ -108,8 +113,7 @@
|
|||
[Vanity Fair](https://www.vanityfair.com)\
|
||||
[Winston-Salem Journal](https://journalnow.com)\
|
||||
[Vrij Nederland](https://vn.nl)\
|
||||
[Wired](https://www.wired.com)\
|
||||
[Zeit Online](https://www.zeit.de)
|
||||
[Wired](https://www.wired.com)
|
||||
|
||||
### Sites with limited number of free articles
|
||||
The free article limit can normally be bypassed by removing cookies for the site.*
|
||||
|
@ -130,8 +134,10 @@ Usually premium articles cannot be bypassed as they are behind a hard paywall.
|
|||
|
||||
### Troubleshooting
|
||||
* This extension works best alongside [uBlock Origin](https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm).
|
||||
* If a site doesn't work try turning off uBlock and refreshing.
|
||||
* If a site doesn't work, try turning off uBlock and refreshing. Also try reinstalling the extension.
|
||||
* Make sure the site is checked under Options (on macOS sometimes the sites are unselected).
|
||||
* Make sure you're running the last version of Bypass Paywalls.
|
||||
* If none of these work, you can submit an issue [here](https://github.com/iamadamdev/bypass-paywalls-chrome/issues).
|
||||
|
||||
### Pull Requests
|
||||
* PRs are welcome.
|
||||
|
|
|
@ -40,7 +40,9 @@ var defaultSites = {
|
|||
'La Repubblica': 'repubblica.it',
|
||||
'La Tercera': 'latercera.com',
|
||||
'L\'Echo': 'lecho.be',
|
||||
'Le Devoir': 'ledevoir.com',
|
||||
'Le Monde': 'lemonde.fr',
|
||||
'Le Parisien': 'leparisien.fr',
|
||||
'Les Echos': 'lesechos.fr',
|
||||
'Liberation': 'liberation.fr',
|
||||
'Loeb Classical Library': 'loebclassics.com',
|
||||
|
@ -73,8 +75,10 @@ var defaultSites = {
|
|||
'The Australian Financial Review': 'afr.com',
|
||||
'The Boston Globe': 'bostonglobe.com',
|
||||
'The Business Journals': 'bizjournals.com',
|
||||
'The Canberra Times': 'canberratimes.com.au',
|
||||
'The Economist': 'economist.com',
|
||||
'The Globe and Mail': 'theglobeandmail.com',
|
||||
'The Hindu': 'thehindu.com',
|
||||
'The Japan Times': 'japantimes.co.jp',
|
||||
'TheMarker': 'themarker.com',
|
||||
'The Mercury News': 'mercurynews.com',
|
||||
|
@ -110,6 +114,7 @@ const allow_cookies = [
|
|||
'ad.nl',
|
||||
'asia.nikkei.com',
|
||||
'bostonglobe.com',
|
||||
'canberratimes.com.au',
|
||||
'chicagobusiness.com',
|
||||
'demorgen.be',
|
||||
'denverpost.com',
|
||||
|
@ -148,6 +153,7 @@ const remove_cookies = [
|
|||
'ad.nl',
|
||||
'asia.nikkei.com',
|
||||
'bostonglobe.com',
|
||||
'canberratimes.com.au',
|
||||
'chicagobusiness.com',
|
||||
'demorgen.be',
|
||||
'denverpost.com',
|
||||
|
@ -189,8 +195,10 @@ const remove_cookies_select_drop = {
|
|||
// Override User-Agent with Googlebot
|
||||
const use_google_bot = [
|
||||
'barrons.com',
|
||||
'lemonde.fr',
|
||||
'mexiconewsdaily.com',
|
||||
'nytimes.com',
|
||||
'quora.com',
|
||||
'telegraph.co.uk',
|
||||
'theaustralian.com.au',
|
||||
'thetimes.co.uk',
|
||||
|
|
|
@ -83,31 +83,29 @@ if (window.location.href.indexOf("mexiconewsdaily.com") !== -1) {
|
|||
}
|
||||
|
||||
if (window.location.href.indexOf("the-american-interest.com") !== -1) {
|
||||
let counter = document.getElementById('article-counter') || false;
|
||||
if (counter) {
|
||||
counter.remove();
|
||||
counter = false;
|
||||
}
|
||||
const counter = document.getElementById('article-counter') || false;
|
||||
if (counter) {
|
||||
counter.remove();
|
||||
counter = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (window.location.href.indexOf("nzherald.co.nz") !== -1) {
|
||||
const paywall = document.getElementById(
|
||||
"article-content"
|
||||
);
|
||||
const paywall = document.getElementById('article-content');
|
||||
if (paywall) {
|
||||
const premium = document.getElementsByClassName('premium-sub')[0];
|
||||
removeDOMElement(premium);
|
||||
paywall.classList.remove('premium-content');
|
||||
paywall.classList.add('full-content');
|
||||
removeClassesByPrefix(paywall, 'QUnW');
|
||||
var paras = paywall.querySelectorAll("p, span, h2, div");
|
||||
var delClass = "";
|
||||
for (var i = paras.length; i--;) {
|
||||
if (delClass == "") {
|
||||
delClass = paras[i].className;
|
||||
}
|
||||
paras[i].classList.remove(delClass);
|
||||
for (var i = 0; i < paras.length; i++){
|
||||
removeClassesByPrefix(paras[i], 'QUnW');
|
||||
paras[i].classList.remove("ellipsis");
|
||||
paras[i].removeAttribute('style');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (window.location.href.indexOf("parool.nl") !== -1 || window.location.href.indexOf("trouw.nl") !== -1 || window.location.href.indexOf("volkskrant.nl") !== -1) {
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
|
@ -137,6 +135,13 @@ if (window.location.href.indexOf("bloombergquint.com") !== -1) {
|
|||
removeDOMElement(articlesLeftModal, paywall);
|
||||
}
|
||||
|
||||
if (window.location.href.indexOf("medium.com") !== -1) {
|
||||
const bottomMessageText = 'Get one more story in your member preview when you sign up. It’s free.';
|
||||
const DOMElementsToTextDiv = pageContains('div', bottomMessageText);
|
||||
|
||||
if (DOMElementsToTextDiv[2]) removeDOMElement(DOMElementsToTextDiv[2]);
|
||||
}
|
||||
|
||||
if (window.location.href.indexOf('lemonde.fr') !== -1) {
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const hidden_section = document.getElementsByClassName('article__content--restricted-media')[0];
|
||||
|
@ -154,10 +159,56 @@ if (window.location.href.indexOf('lemonde.fr') !== -1) {
|
|||
removeDOMElement(paywall, friend_paywall, cookie_banner);
|
||||
});
|
||||
}
|
||||
|
||||
if (window.location.href.indexOf("canberratimes.com.au") !== -1) {
|
||||
|
||||
const paywall = document.querySelector('.subscribe-article.news-article-body.article__body');
|
||||
paywall.classList.remove('subscribe-article');
|
||||
|
||||
var subscribe = document.getElementsByClassName('subscriber-container')[0];
|
||||
removeDOMElement(subscribe);
|
||||
|
||||
var content = document.getElementsByClassName('subscriber-hider');
|
||||
for (var i = 0; i < content.length; i++) {
|
||||
content[i].classList.remove('subscriber-hider');
|
||||
}
|
||||
}
|
||||
|
||||
if (window.location.href.indexOf("ledevoir.com") !== -1) {
|
||||
|
||||
const counter = document.querySelector('.full.hidden-print.popup-msg');
|
||||
removeDOMElement(counter);
|
||||
}
|
||||
|
||||
if (window.location.href.includes('ft.com')) {
|
||||
const cookie_banner = document.querySelector('.n-messaging-banner__outer');
|
||||
removeDOMElement(cookie_banner);
|
||||
|
||||
if (window.location.href.indexOf("thehindu.com") !== -1) {
|
||||
|
||||
const paywall = document.getElementById('test');
|
||||
removeDOMElement(paywall);
|
||||
}
|
||||
|
||||
if (window.location.href.indexOf("nytimes.com") !== -1) {
|
||||
|
||||
const preview_button = document.querySelector('.css-3s1ce0');
|
||||
if (preview_button)
|
||||
preview_button.click();
|
||||
}
|
||||
|
||||
if (window.location.href.indexOf("leparisien.fr") !== -1) {
|
||||
window.removeEventListener('scroll', this.scrollListener);
|
||||
|
||||
const paywall = document.querySelector('.relative.piano-paywall.below_nav.sticky');
|
||||
removeDOMElement(paywall);
|
||||
|
||||
setTimeout(function () {
|
||||
var content = document.getElementsByClassName('content');
|
||||
for (var i = 0; i < content.length; i++) {
|
||||
content[i].removeAttribute("style");
|
||||
}
|
||||
}, 300); // Delay (in milliseconds)
|
||||
}
|
||||
|
||||
function removeDOMElement(...elements) {
|
||||
|
@ -166,3 +217,18 @@ function removeDOMElement(...elements) {
|
|||
element.remove();
|
||||
}
|
||||
}
|
||||
|
||||
function removeClassesByPrefix(el, prefix) {
|
||||
for (var i = 0; i < el.classList.length; i++){
|
||||
if(el.classList[i].startsWith(prefix)) {
|
||||
el.classList.remove(el.classList[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function pageContains(selector, text) {
|
||||
let elements = document.querySelectorAll(selector);
|
||||
return Array.prototype.filter.call(elements, function(element){
|
||||
return RegExp(text).test(element.textContent);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
"default_popup": "popup.html"
|
||||
},
|
||||
"description": "Bypass News Sites' Paywalls",
|
||||
"homepage_url": "https://github.com/iamadamdev/bypass-paywalls-chrome/blob/master/README.md",
|
||||
"icons": {
|
||||
"128": "bypass.png"
|
||||
},
|
||||
|
@ -20,5 +21,5 @@
|
|||
"page": "options.html"
|
||||
},
|
||||
"permissions": [ "cookies", "<all_urls>", "storage", "webRequest", "webRequestBlocking"],
|
||||
"version": "1.5.6"
|
||||
"version": "1.5.8"
|
||||
}
|
||||
|
|
14
options.js
14
options.js
|
@ -15,6 +15,7 @@ var defaultSites = {
|
|||
'De Volkskrant': 'volkskrant.nl',
|
||||
'DeMorgen': 'demorgen.be',
|
||||
'Denver Post': 'denverpost.com',
|
||||
'Die Zeit': 'zeit.de',
|
||||
'Dynamed Plus': 'dynamed.com',
|
||||
'Encyclopedia Britannica': 'britannica.com',
|
||||
'Eindhovens Dagblad': 'ed.nl',
|
||||
|
@ -26,16 +27,17 @@ var defaultSites = {
|
|||
'Glassdoor': 'glassdoor.com',
|
||||
'Haaretz': 'haaretz.co.il',
|
||||
'Haaretz English': 'haaretz.com',
|
||||
'Harper\'s Mag': 'harpers.org',
|
||||
'Harper\'s Magazine': 'harpers.org',
|
||||
'Hartford Courant': 'courant.com',
|
||||
'Harvard Business Review': 'hbr.org',
|
||||
'Inc.com': 'inc.com',
|
||||
'Irish Times': 'irishtimes.com',
|
||||
'La Nacion': 'lanacion.com.ar',
|
||||
'La Repubblica': 'repubblica.it',
|
||||
'La Tercera': 'latercera.com',
|
||||
'L\'Echo': 'lecho.be',
|
||||
'Le Devoir': 'ledevoir.com',
|
||||
'Le Monde': 'lemonde.fr',
|
||||
'Le Parisien': 'leparisien.fr',
|
||||
'Les Echos': 'lesechos.fr',
|
||||
'Liberation': 'liberation.fr',
|
||||
'Loeb Classical Library': 'loebclassics.com',
|
||||
|
@ -68,8 +70,11 @@ var defaultSites = {
|
|||
'The Australian Financial Review (javascript disabled)': 'afr.com',
|
||||
'The Boston Globe (javascript disabled)': 'bostonglobe.com',
|
||||
'The Business Journals (javascript disabled)': 'bizjournals.com',
|
||||
'The Canberra Times': 'canberratimes.com.au',
|
||||
'The Economist (javascript disabled)': 'economist.com',
|
||||
'The Globe and Mail (javascript disabled)': 'theglobeandmail.com',
|
||||
'The Hindu': 'thehindu.com',
|
||||
'The Irish Times': 'irishtimes.com',
|
||||
'The Japan Times': 'japantimes.co.jp',
|
||||
'TheMarker': 'themarker.com',
|
||||
'The Mercury News': 'mercurynews.com',
|
||||
|
@ -92,8 +97,7 @@ var defaultSites = {
|
|||
'Winston-Salem Journal': 'journalnow.com',
|
||||
'Vanity Fair': 'vanityfair.com',
|
||||
'Vrij Nederland': 'vn.nl',
|
||||
'Wired': 'wired.com',
|
||||
'Zeit Online': 'zeit.de'
|
||||
'Wired': 'wired.com'
|
||||
};
|
||||
|
||||
// Saves options to chrome.storage
|
||||
|
@ -141,7 +145,7 @@ function renderOptions() {
|
|||
inputEl.type = 'checkbox';
|
||||
inputEl.dataset.key = key;
|
||||
inputEl.dataset.value = value;
|
||||
inputEl.checked = key in sites;
|
||||
inputEl.checked = (key in sites) || (key.replace(/\s\(.*\)/, '') in sites);
|
||||
|
||||
labelEl.appendChild(inputEl);
|
||||
labelEl.appendChild(document.createTextNode(' '+key));
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
||||
<app appid='dcpihecpambacapedldabdbpakmachpb'>
|
||||
<updatecheck codebase='https://github.com/iamadamdev/bypass-paywalls-chrome/releases/download/v1.5.6/bypass-paywalls-chrome.crx' version='1.5.6' />
|
||||
<updatecheck codebase='https://github.com/iamadamdev/bypass-paywalls-chrome/releases/download/v1.5.8/bypass-paywalls-chrome.crx' version='1.5.8' />
|
||||
</app>
|
||||
</gupdate>
|
||||
|
|
Loading…
Reference in New Issue