Merge branch 'master' into feature/remove-medium-footer
commit
d5fcaf92e8
10
README.md
10
README.md
|
@ -1,9 +1,10 @@
|
||||||
# Bypass Paywalls for Firefox
|
# Bypass Paywalls for Firefox
|
||||||
|
|
||||||
## [Download and install the latest version](https://github.com/iamadamdev/bypass-paywalls-firefox/releases/download/v1.5.9/bypass_paywalls-1.5.9-an+fx.xpi)
|
## [Download and install the latest version](https://github.com/iamadamdev/bypass-paywalls-firefox/releases/download/v1.6.0/bypass_paywalls-1.6.0-an+fx.xpi)
|
||||||
|
|
||||||
### Bypass the following sites' paywalls with this extension
|
### Bypass the following sites' paywalls with this extension
|
||||||
|
|
||||||
|
[Algemeen Dagblad](https://www.ad.nl)\
|
||||||
[Baltimore Sun](https://www.baltimoresun.com)\
|
[Baltimore Sun](https://www.baltimoresun.com)\
|
||||||
[Barron's](https://www.barrons.com)\
|
[Barron's](https://www.barrons.com)\
|
||||||
[Bloomberg](https://www.bloomberg.com)\
|
[Bloomberg](https://www.bloomberg.com)\
|
||||||
|
@ -16,9 +17,11 @@
|
||||||
[Corriere Della Sera](https://www.corriere.it)\
|
[Corriere Della Sera](https://www.corriere.it)\
|
||||||
[Daily Press](https://www.dailypress.com)\
|
[Daily Press](https://www.dailypress.com)\
|
||||||
[Denver Post](https://www.denverpost.com)\
|
[Denver Post](https://www.denverpost.com)\
|
||||||
|
[De Groene Amsterdammer](https://www.groene.nl)\
|
||||||
[De Tijd](https://www.tijd.be)\
|
[De Tijd](https://www.tijd.be)\
|
||||||
[de Volkskrant](https://www.volkskrant.nl)\
|
[de Volkskrant](https://www.volkskrant.nl)\
|
||||||
[The Economist](https://www.economist.com)\
|
[The Economist](https://www.economist.com)\
|
||||||
|
[Eindhovens Dagblad](https://ed.nl)\
|
||||||
[Examiner](https://www.examiner.com.au)\
|
[Examiner](https://www.examiner.com.au)\
|
||||||
[Financial Times](https://www.ft.com)\
|
[Financial Times](https://www.ft.com)\
|
||||||
[Foreign Policy](https://www.foreignpolicy.com)\
|
[Foreign Policy](https://www.foreignpolicy.com)\
|
||||||
|
@ -31,6 +34,7 @@
|
||||||
[Inc.com](https://www.inc.com)\
|
[Inc.com](https://www.inc.com)\
|
||||||
[Investors Chronicle](https://www.investorschronicle.co.uk)\
|
[Investors Chronicle](https://www.investorschronicle.co.uk)\
|
||||||
[La Repubblica](https://www.repubblica.it)\
|
[La Repubblica](https://www.repubblica.it)\
|
||||||
|
[Le Monde](https://www.lemonde.fr)\
|
||||||
[Le Temps](https://www.letemps.ch)\
|
[Le Temps](https://www.letemps.ch)\
|
||||||
[Los Angeles Times](https://www.latimes.com)\
|
[Los Angeles Times](https://www.latimes.com)\
|
||||||
[Medium](https://www.medium.com)\
|
[Medium](https://www.medium.com)\
|
||||||
|
@ -46,10 +50,12 @@
|
||||||
[Orange County Register](https://www.ocregister.com)\
|
[Orange County Register](https://www.ocregister.com)\
|
||||||
[Orlando Sentinel](https://www.orlandosentinel.com)\
|
[Orlando Sentinel](https://www.orlandosentinel.com)\
|
||||||
[Palo Alto Online](https://www.paloaltoonline.com)\
|
[Palo Alto Online](https://www.paloaltoonline.com)\
|
||||||
|
[Parool](https://www.parool.nl)\
|
||||||
[Quartz](https://qz.com)\
|
[Quartz](https://qz.com)\
|
||||||
[Quora](https://www.quora.com)\
|
[Quora](https://www.quora.com)\
|
||||||
[Statista](https://www.statista.com)\
|
[Statista](https://www.statista.com)\
|
||||||
[SunSentinel](https://www.sun-sentinel.com)\
|
[SunSentinel](https://www.sun-sentinel.com)\
|
||||||
|
[Telegraaf](https://telegraaf.nl)\
|
||||||
[The Advocate](https://www.theadvocate.com.au)\
|
[The Advocate](https://www.theadvocate.com.au)\
|
||||||
[The Age](https://www.theage.com.au)\
|
[The Age](https://www.theage.com.au)\
|
||||||
[The Atlantic](https://www.theatlantic.com)\
|
[The Atlantic](https://www.theatlantic.com)\
|
||||||
|
@ -78,7 +84,9 @@
|
||||||
[The Washington Post](https://www.washingtonpost.com)\
|
[The Washington Post](https://www.washingtonpost.com)\
|
||||||
[The Wall Street Journal](https://www.wsj.com)\
|
[The Wall Street Journal](https://www.wsj.com)\
|
||||||
[Towards Data Science](https://www.towardsdatascience.com)\
|
[Towards Data Science](https://www.towardsdatascience.com)\
|
||||||
|
[Trouw](https://www.trouw.nl)\
|
||||||
[Vanity Fair](https://www.vanityfair.com)\
|
[Vanity Fair](https://www.vanityfair.com)\
|
||||||
|
[Vrij Nederland](https://www.vn.nl)\
|
||||||
[Wired](https://www.wired.com)
|
[Wired](https://www.wired.com)
|
||||||
|
|
||||||
### Sites with limited number of free articles
|
### Sites with limited number of free articles
|
||||||
|
|
143
background.js
143
background.js
|
@ -1,6 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var defaultSites = {
|
var defaultSites = {
|
||||||
|
'Algemeen Dagblad': 'ad.nl',
|
||||||
'Baltimore Sun': 'baltimoresun.com',
|
'Baltimore Sun': 'baltimoresun.com',
|
||||||
'Barron\'s': 'barrons.com',
|
'Barron\'s': 'barrons.com',
|
||||||
'Bloomberg': 'bloomberg.com',
|
'Bloomberg': 'bloomberg.com',
|
||||||
|
@ -14,8 +15,10 @@ var defaultSites = {
|
||||||
'Daily Press': 'dailypress.com',
|
'Daily Press': 'dailypress.com',
|
||||||
'Denver Post': 'denverpost.com',
|
'Denver Post': 'denverpost.com',
|
||||||
'De Tijd': 'tijd.be',
|
'De Tijd': 'tijd.be',
|
||||||
|
'De Groene Amsterdammer': 'groene.nl',
|
||||||
'de Volkskrant': 'volkskrant.nl',
|
'de Volkskrant': 'volkskrant.nl',
|
||||||
'The Economist': 'economist.com',
|
'The Economist': 'economist.com',
|
||||||
|
'Eindhovens Dagblad': 'ed.nl',
|
||||||
'Examiner': 'examiner.com.au',
|
'Examiner': 'examiner.com.au',
|
||||||
'Financial Times': 'ft.com',
|
'Financial Times': 'ft.com',
|
||||||
'Foreign Policy': 'foreignpolicy.com',
|
'Foreign Policy': 'foreignpolicy.com',
|
||||||
|
@ -28,6 +31,7 @@ var defaultSites = {
|
||||||
'Inc.com': 'inc.com',
|
'Inc.com': 'inc.com',
|
||||||
'Investors Chronicle': 'investorschronicle.co.uk',
|
'Investors Chronicle': 'investorschronicle.co.uk',
|
||||||
'La Repubblica': 'repubblica.it',
|
'La Repubblica': 'repubblica.it',
|
||||||
|
'Le Monde': 'lemonde.fr',
|
||||||
'Le Temps': 'letemps.ch',
|
'Le Temps': 'letemps.ch',
|
||||||
'Los Angeles Times': 'latimes.com',
|
'Los Angeles Times': 'latimes.com',
|
||||||
'Medium': 'medium.com',
|
'Medium': 'medium.com',
|
||||||
|
@ -43,9 +47,11 @@ var defaultSites = {
|
||||||
'Orange County Register': 'ocregister.com',
|
'Orange County Register': 'ocregister.com',
|
||||||
'Orlando Sentinel': 'orlandosentinel.com',
|
'Orlando Sentinel': 'orlandosentinel.com',
|
||||||
'Palo Alto Online': 'paloaltoonline.com',
|
'Palo Alto Online': 'paloaltoonline.com',
|
||||||
|
'Parool': 'parool.nl',
|
||||||
'Quartz': 'qz.com',
|
'Quartz': 'qz.com',
|
||||||
'Quora': 'quora.com',
|
'Quora': 'quora.com',
|
||||||
'Statista': 'statista.com',
|
'Statista': 'statista.com',
|
||||||
|
'Telegraaf': 'telegraaf.nl',
|
||||||
'SunSentinel': 'sun-sentinel.com',
|
'SunSentinel': 'sun-sentinel.com',
|
||||||
'The Advocate': 'theadvocate.com.au',
|
'The Advocate': 'theadvocate.com.au',
|
||||||
'The Age': 'theage.com.au',
|
'The Age': 'theage.com.au',
|
||||||
|
@ -69,12 +75,15 @@ var defaultSites = {
|
||||||
'The Spectator': 'spectator.co.uk',
|
'The Spectator': 'spectator.co.uk',
|
||||||
'The Seattle Times': 'seattletimes.com',
|
'The Seattle Times': 'seattletimes.com',
|
||||||
'The Sydney Morning Herald': 'smh.com.au',
|
'The Sydney Morning Herald': 'smh.com.au',
|
||||||
|
'The Telegraph': 'telegraph.co.uk',
|
||||||
'The Times': 'thetimes.co.uk',
|
'The Times': 'thetimes.co.uk',
|
||||||
'The Toronto Star': 'thestar.com',
|
'The Toronto Star': 'thestar.com',
|
||||||
'The Washington Post': 'washingtonpost.com',
|
'The Washington Post': 'washingtonpost.com',
|
||||||
'The Wall Street Journal': 'wsj.com',
|
'The Wall Street Journal': 'wsj.com',
|
||||||
'Towards Data Science': 'towardsdatascience.com',
|
'Towards Data Science': 'towardsdatascience.com',
|
||||||
|
'Trouw': 'trouw.nl',
|
||||||
'Vanity Fair': 'vanityfair.com',
|
'Vanity Fair': 'vanityfair.com',
|
||||||
|
'Vrij Nederland': 'vn.nl',
|
||||||
'Wired': 'wired.com'
|
'Wired': 'wired.com'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -84,77 +93,98 @@ const restrictions = {
|
||||||
|
|
||||||
// Don't remove cookies before page load
|
// Don't remove cookies before page load
|
||||||
const allow_cookies = [
|
const allow_cookies = [
|
||||||
|
'ad.nl',
|
||||||
'asia.nikkei.com',
|
'asia.nikkei.com',
|
||||||
'nytimes.com',
|
|
||||||
'wsj.com',
|
|
||||||
'ft.com',
|
|
||||||
'letemps.ch',
|
|
||||||
'mercurynews.com',
|
|
||||||
'economist.com',
|
|
||||||
'bostonglobe.com',
|
'bostonglobe.com',
|
||||||
|
'cen.acs.org',
|
||||||
|
'chicagobusiness.com',
|
||||||
'denverpost.com',
|
'denverpost.com',
|
||||||
'hacked.com',
|
'economist.com',
|
||||||
'ocregister.com',
|
'ed.nl',
|
||||||
'newstatesman.com',
|
|
||||||
'spectator.co.uk',
|
|
||||||
'towardsdatascience.com',
|
|
||||||
'medium.com',
|
|
||||||
'theadvocate.com.au',
|
|
||||||
'examiner.com.au',
|
'examiner.com.au',
|
||||||
'thestar.com',
|
'ft.com',
|
||||||
'washingtonpost.com',
|
'hacked.com',
|
||||||
'hbr.org',
|
'hbr.org',
|
||||||
|
'lemonde.fr',
|
||||||
|
'letemps.ch',
|
||||||
|
'medium.com',
|
||||||
|
'mercurynews.com',
|
||||||
|
'newstatesman.com',
|
||||||
'nymag.com',
|
'nymag.com',
|
||||||
|
'nytimes.com',
|
||||||
|
'ocregister.com',
|
||||||
|
'parool.nl',
|
||||||
|
'qz.com',
|
||||||
|
'spectator.co.uk',
|
||||||
|
'telegraaf.nl',
|
||||||
|
'theadvocate.com.au',
|
||||||
|
'theage.com.au',
|
||||||
'theaustralian.com.au',
|
'theaustralian.com.au',
|
||||||
|
'thediplomat.com',
|
||||||
|
'thestar.com',
|
||||||
|
'towardsdatascience.com',
|
||||||
|
'trouw.nl',
|
||||||
|
'vn.nl',
|
||||||
'volkskrant.nl',
|
'volkskrant.nl',
|
||||||
|
'washingtonpost.com',
|
||||||
|
'wsj.com',
|
||||||
]
|
]
|
||||||
|
|
||||||
// Removes cookies after page load
|
// Removes cookies after page load
|
||||||
const remove_cookies = [
|
const remove_cookies = [
|
||||||
|
'ad.nl',
|
||||||
'asia.nikkei.com',
|
'asia.nikkei.com',
|
||||||
'nytimes.com',
|
|
||||||
'ft.com',
|
|
||||||
'letemps.ch',
|
|
||||||
'mercurynews.com',
|
|
||||||
'theage.com.au',
|
|
||||||
'economist.com',
|
|
||||||
'bostonglobe.com',
|
'bostonglobe.com',
|
||||||
'denverpost.com',
|
|
||||||
'hacked.com',
|
|
||||||
'ocregister.com',
|
|
||||||
'newstatesman.com',
|
|
||||||
'spectator.co.uk',
|
|
||||||
'towardsdatascience.com',
|
|
||||||
'medium.com',
|
|
||||||
'theadvocate.com.au',
|
|
||||||
'examiner.com.au',
|
|
||||||
'thestar.com',
|
|
||||||
'centralwesterndaily.com.au',
|
|
||||||
'theherald.com.au',
|
|
||||||
'foreignpolicy.com',
|
|
||||||
'wsj.com',
|
|
||||||
'glassdoor.com',
|
|
||||||
'cen.acs.org',
|
'cen.acs.org',
|
||||||
'hbr.org',
|
|
||||||
'thenewsrep.com',
|
|
||||||
'washingtonpost.com',
|
|
||||||
'nymag.com',
|
|
||||||
'nationalpost.com',
|
|
||||||
'volkskrant.nl',
|
|
||||||
'handelsblatt.com',
|
|
||||||
'thediplomat.com',
|
|
||||||
'latimes.com',
|
|
||||||
'theatlantic.com',
|
|
||||||
'chicagobusiness.com',
|
'chicagobusiness.com',
|
||||||
|
'denverpost.com',
|
||||||
|
'economist.com',
|
||||||
|
'ed.nl',
|
||||||
|
'examiner.com.au',
|
||||||
|
'ft.com',
|
||||||
|
'hacked.com',
|
||||||
|
'hbr.org',
|
||||||
|
'letemps.ch',
|
||||||
|
'medium.com',
|
||||||
|
'mercurynews.com',
|
||||||
|
'newstatesman.com',
|
||||||
|
'nymag.com',
|
||||||
|
'nytimes.com',
|
||||||
|
'ocregister.com',
|
||||||
'qz.com',
|
'qz.com',
|
||||||
|
'spectator.co.uk',
|
||||||
|
'telegraaf.nl',
|
||||||
|
'theadvocate.com.au',
|
||||||
|
'theage.com.au',
|
||||||
|
'thediplomat.com',
|
||||||
|
'thestar.com',
|
||||||
|
'towardsdatascience.com',
|
||||||
|
'vn.nl',
|
||||||
|
'washingtonpost.com',
|
||||||
|
'wsj.com',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
// select specific cookie(s) to hold from remove_cookies domains
|
||||||
|
const remove_cookies_select_hold = {
|
||||||
|
'.nrc.nl': ['nmt_closed_cookiebar'],
|
||||||
|
'.washingtonpost.com': ['wp_gdpr'],
|
||||||
|
'.wsj.com': ['wsjregion']
|
||||||
|
}
|
||||||
|
|
||||||
|
// select only specific cookie(s) to drop from remove_cookies domains
|
||||||
|
const remove_cookies_select_drop = {
|
||||||
|
'www.nrc.nl': ['counter']
|
||||||
|
}
|
||||||
|
|
||||||
// Override User-Agent with Googlebot
|
// Override User-Agent with Googlebot
|
||||||
const use_google_bot = [
|
const use_google_bot = [
|
||||||
'theaustralian.com.au',
|
|
||||||
'telegraph.co.uk',
|
|
||||||
'thetimes.co.uk',
|
|
||||||
'barrons.com',
|
'barrons.com',
|
||||||
|
'nytimes.com',
|
||||||
|
'quora.com',
|
||||||
|
'telegraph.co.uk',
|
||||||
|
'theaustralian.com.au',
|
||||||
|
'thetimes.co.uk',
|
||||||
|
'wsj.com',
|
||||||
]
|
]
|
||||||
|
|
||||||
function setDefaultOptions() {
|
function setDefaultOptions() {
|
||||||
|
@ -210,9 +240,10 @@ browser.runtime.onInstalled.addListener(function(details) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
// WSJ bypass
|
// WSJ bypass
|
||||||
browser.webRequest.onBeforeSendHeaders.addListener(function(details) {
|
browser.webRequest.onBeforeSendHeaders.addListener(function(details) {
|
||||||
if (!isSiteEnabled(details) || details.url.indexOf("mod=rsswn") !== -1) {
|
if (!isSiteEnabled(details) || details.url.indexOf("mod=rsswn") !== -1 || details.url.indexOf("/print-edition/") !== -1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -232,6 +263,7 @@ browser.webRequest.onBeforeSendHeaders.addListener(function(details) {
|
||||||
{urls:["*://*.wsj.com/*"], types:["main_frame"]},
|
{urls:["*://*.wsj.com/*"], types:["main_frame"]},
|
||||||
["blocking"]
|
["blocking"]
|
||||||
);
|
);
|
||||||
|
**/
|
||||||
|
|
||||||
// Disable javascript for these sites
|
// Disable javascript for these sites
|
||||||
chrome.webRequest.onBeforeRequest.addListener(function(details) {
|
chrome.webRequest.onBeforeRequest.addListener(function(details) {
|
||||||
|
@ -361,6 +393,17 @@ browser.webRequest.onCompleted.addListener(function(details) {
|
||||||
if (cookies[i].firstPartyDomain !== undefined) {
|
if (cookies[i].firstPartyDomain !== undefined) {
|
||||||
cookie.firstPartyDomain = cookies[i].firstPartyDomain;
|
cookie.firstPartyDomain = cookies[i].firstPartyDomain;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var cookie_domain = cookies[i].domain;
|
||||||
|
// hold specific cookie(s) from remove_cookies domains
|
||||||
|
if ((cookie_domain in remove_cookies_select_hold) && remove_cookies_select_hold[cookie_domain].includes(cookies[i].name)){
|
||||||
|
continue; // don't remove specific cookie
|
||||||
|
}
|
||||||
|
// drop only specific cookie(s) from remove_cookies domains
|
||||||
|
if ((cookie_domain in remove_cookies_select_drop) && !(remove_cookies_select_drop[cookie_domain].includes(cookies[i].name))){
|
||||||
|
continue; // only remove specific cookie
|
||||||
|
}
|
||||||
|
|
||||||
browser.cookies.remove(cookie);
|
browser.cookies.remove(cookie);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -69,9 +69,18 @@ if (window.location.href.indexOf("bizjournals.com") !== -1) {
|
||||||
}
|
}
|
||||||
} else if (window.location.href.indexOf("wsj.com") !== -1) {
|
} else if (window.location.href.indexOf("wsj.com") !== -1) {
|
||||||
if (location.href.includes('/articles/')) {
|
if (location.href.includes('/articles/')) {
|
||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
const paywall = document.getElementById('cx-scrim');
|
||||||
|
const candybar = document.getElementById('cx-candybar');
|
||||||
|
removeDOMElement(paywall, candybar);
|
||||||
|
});
|
||||||
|
/**
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
document.querySelector('.close-btn').click();
|
const close_button = document.querySelector('.close-btn');
|
||||||
|
if (close_button)
|
||||||
|
close_button.click();
|
||||||
}, 2000);
|
}, 2000);
|
||||||
|
**/
|
||||||
}
|
}
|
||||||
} else if (window.location.href.indexOf("washingtonpost.com") !== -1) {
|
} else if (window.location.href.indexOf("washingtonpost.com") !== -1) {
|
||||||
if (location.href.includes('/gdpr-consent/')) {
|
if (location.href.includes('/gdpr-consent/')) {
|
||||||
|
@ -92,19 +101,64 @@ if (window.location.href.indexOf("bizjournals.com") !== -1) {
|
||||||
|
|
||||||
if (window.location.href.indexOf("medium.com") !== -1) {
|
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 bottomMessageText = 'Get one more story in your member preview when you sign up. It’s free.';
|
||||||
const DOMElementsToTextDiv = contains('div', bottomMessageText);
|
const DOMElementsToTextDiv = pageContains('div', bottomMessageText);
|
||||||
|
|
||||||
|
|
||||||
if(DOMElementsToTextDiv[2]) removeDOMElement(DOMElementsToTextDiv[2]);
|
if(DOMElementsToTextDiv[2]) removeDOMElement(DOMElementsToTextDiv[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (window.location.href.indexOf("bloomberg.com") !== -1) {
|
||||||
|
const paywall = document.getElementById('paywall-banner');
|
||||||
|
removeDOMElement(paywall);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (window.location.href.indexOf('telegraaf.nl') !== -1) {
|
||||||
|
const paywall = document.getElementById('TEMPRORARY_METERING_ID');
|
||||||
|
if (paywall) {
|
||||||
|
window.location.reload(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (window.location.href.indexOf('ed.nl') !== -1) {
|
||||||
|
const paywall = document.querySelector('.article__component.article__component--paywall-module-notification');
|
||||||
|
if (paywall) {
|
||||||
|
paywall.remove();
|
||||||
|
paywall = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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', () => {
|
||||||
|
const paywall = document.querySelector('div[data-temptation-position="ARTICLE_BOTTOM"]');
|
||||||
|
const hidden_section = document.querySelector('div[data-temptation-position="ARTICLE_INLINE"]');
|
||||||
|
removeDOMElement(paywall, hidden_section);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (window.location.href.indexOf('lemonde.fr') !== -1) {
|
||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
const hidden_section = document.getElementsByClassName('article__content--restricted-media')[0];
|
||||||
|
if (hidden_section)
|
||||||
|
hidden_section.classList.remove('article__content--restricted-media');
|
||||||
|
const longform_article_restricted = document.getElementsByClassName('article__content--restricted')[0];
|
||||||
|
if (longform_article_restricted)
|
||||||
|
longform_article_restricted.classList.remove('article__content--restricted');
|
||||||
|
const longform_paywall = document.getElementsByClassName('paywall--longform')[0];
|
||||||
|
if (longform_paywall)
|
||||||
|
longform_paywall.classList.remove('paywall--longform');
|
||||||
|
const paywall = document.getElementById('js-paywall-content');
|
||||||
|
const friend_paywall = document.getElementsByClassName('friend--paywall')[0];
|
||||||
|
const cookie_banner = document.getElementById('cookie-banner');
|
||||||
|
removeDOMElement(paywall, friend_paywall, cookie_banner);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function removeDOMElement(...elements) {
|
function removeDOMElement(...elements) {
|
||||||
for (let element of elements) {
|
for (let element of elements) {
|
||||||
if (element) element.remove();
|
if (element) element.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function contains(selector, text) {
|
function pageContains(selector, text) {
|
||||||
let elements = document.querySelectorAll(selector);
|
let elements = document.querySelectorAll(selector);
|
||||||
|
|
||||||
return Array.prototype.filter.call(elements, function(element){
|
return Array.prototype.filter.call(elements, function(element){
|
||||||
|
|
|
@ -6,9 +6,18 @@
|
||||||
{
|
{
|
||||||
"matches": [
|
"matches": [
|
||||||
"*://*.bizjournals.com/*",
|
"*://*.bizjournals.com/*",
|
||||||
|
"*://*.bloomberg.com/*",
|
||||||
"*://*.businessinsider.com/*",
|
"*://*.businessinsider.com/*",
|
||||||
|
"*://*.ed.nl/*",
|
||||||
"*://*.haaretz.co.il/*",
|
"*://*.haaretz.co.il/*",
|
||||||
"*://*.repubblica.it/*"
|
"*://*.lemonde.fr/*",
|
||||||
|
"*://*.nzherald.co.nz/*",
|
||||||
|
"*://*.parool.nl/*",
|
||||||
|
"*://*.repubblica.it/*",
|
||||||
|
"*://*.telegraaf.nl/*",
|
||||||
|
"*://*.trouw.nl/*",
|
||||||
|
"*://*.volkskrant.nl/*",
|
||||||
|
"*://*.washingtonpost.com/*"
|
||||||
],
|
],
|
||||||
"js": ["contentScript.js"]
|
"js": ["contentScript.js"]
|
||||||
}
|
}
|
||||||
|
@ -121,7 +130,15 @@
|
||||||
"*://*.wired.com/*",
|
"*://*.wired.com/*",
|
||||||
"*://*.thediplomat.com/*",
|
"*://*.thediplomat.com/*",
|
||||||
"*://*.theatlantic.com/*",
|
"*://*.theatlantic.com/*",
|
||||||
"*://*.qz.com/*"
|
"*://*.qz.com/*",
|
||||||
|
"*://*.ad.nl/*",
|
||||||
|
"*://*.ed.nl/*",
|
||||||
|
"*://*.groene.nl/*",
|
||||||
|
"*://*.parool.nl/*",
|
||||||
|
"*://*.telegraaf.nl/*",
|
||||||
|
"*://*.trouw.nl/*",
|
||||||
|
"*://*.vn.nl/*",
|
||||||
|
"*://*.lemonde.fr/*"
|
||||||
],
|
],
|
||||||
"version": "1.5.9"
|
"version": "1.6.0"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
var defaultSites = {
|
var defaultSites = {
|
||||||
|
'Algemeen Dagblad': 'ad.nl',
|
||||||
'Baltimore Sun': 'baltimoresun.com',
|
'Baltimore Sun': 'baltimoresun.com',
|
||||||
'Barron\'s': 'barrons.com',
|
'Barron\'s': 'barrons.com',
|
||||||
'Bloomberg': 'bloomberg.com',
|
'Bloomberg': 'bloomberg.com',
|
||||||
|
@ -11,9 +12,11 @@ var defaultSites = {
|
||||||
'Corriere Della Sera': 'corriere.it',
|
'Corriere Della Sera': 'corriere.it',
|
||||||
'Daily Press': 'dailypress.com',
|
'Daily Press': 'dailypress.com',
|
||||||
'Denver Post': 'denverpost.com',
|
'Denver Post': 'denverpost.com',
|
||||||
|
'De Groene Amsterdammer': 'groene.nl',
|
||||||
'De Tijd': 'tijd.be',
|
'De Tijd': 'tijd.be',
|
||||||
'de Volkskrant': 'volkskrant.nl',
|
'de Volkskrant': 'volkskrant.nl',
|
||||||
'The Economist (javascript disabled)': 'economist.com',
|
'The Economist (javascript disabled)': 'economist.com',
|
||||||
|
'Eindhovens Dagblad': 'ed.nl',
|
||||||
'Examiner': 'examiner.com.au',
|
'Examiner': 'examiner.com.au',
|
||||||
'Financial Times': 'ft.com',
|
'Financial Times': 'ft.com',
|
||||||
'Foreign Policy': 'foreignpolicy.com',
|
'Foreign Policy': 'foreignpolicy.com',
|
||||||
|
@ -26,6 +29,7 @@ var defaultSites = {
|
||||||
'Inc.com': 'inc.com',
|
'Inc.com': 'inc.com',
|
||||||
'Investors Chronicle': 'investorschronicle.co.uk',
|
'Investors Chronicle': 'investorschronicle.co.uk',
|
||||||
'La Repubblica': 'repubblica.it',
|
'La Repubblica': 'repubblica.it',
|
||||||
|
'Le Monde': 'lemonde.fr',
|
||||||
'Le Temps': 'letemps.ch',
|
'Le Temps': 'letemps.ch',
|
||||||
'Los Angeles Times': 'latimes.com',
|
'Los Angeles Times': 'latimes.com',
|
||||||
'Medium': 'medium.com',
|
'Medium': 'medium.com',
|
||||||
|
@ -41,10 +45,12 @@ var defaultSites = {
|
||||||
'Orange County Register': 'ocregister.com',
|
'Orange County Register': 'ocregister.com',
|
||||||
'Orlando Sentinel': 'orlandosentinel.com',
|
'Orlando Sentinel': 'orlandosentinel.com',
|
||||||
'Palo Alto Online': 'paloaltoonline.com',
|
'Palo Alto Online': 'paloaltoonline.com',
|
||||||
|
'Parool': 'parool.nl',
|
||||||
'Quartz': 'qz.com',
|
'Quartz': 'qz.com',
|
||||||
'Quora': 'quora.com',
|
'Quora': 'quora.com',
|
||||||
'Statista': 'statista.com',
|
'Statista': 'statista.com',
|
||||||
'SunSentinel': 'sun-sentinel.com',
|
'SunSentinel': 'sun-sentinel.com',
|
||||||
|
'Telegraaf': 'telegraaf.nl',
|
||||||
'The Advocate': 'theadvocate.com.au',
|
'The Advocate': 'theadvocate.com.au',
|
||||||
'The Age': 'theage.com.au',
|
'The Age': 'theage.com.au',
|
||||||
'The Atlantic': 'theatlantic.com',
|
'The Atlantic': 'theatlantic.com',
|
||||||
|
@ -73,7 +79,9 @@ var defaultSites = {
|
||||||
'The Washington Post': 'washingtonpost.com',
|
'The Washington Post': 'washingtonpost.com',
|
||||||
'The Wall Street Journal': 'wsj.com',
|
'The Wall Street Journal': 'wsj.com',
|
||||||
'Towards Data Science': 'towardsdatascience.com',
|
'Towards Data Science': 'towardsdatascience.com',
|
||||||
|
'Trouw': 'trouw.nl',
|
||||||
'Vanity Fair': 'vanityfair.com',
|
'Vanity Fair': 'vanityfair.com',
|
||||||
|
'Vrij Nederland': 'vn.nl',
|
||||||
'Wired': 'wired.com'
|
'Wired': 'wired.com'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,9 @@
|
||||||
{ "version": "1.5.8",
|
{ "version": "1.5.8",
|
||||||
"update_link": "https://github.com/iamadamdev/bypass-paywalls-firefox/releases/download/v1.5.8/bypass_paywalls-1.5.8-an+fx.xpi" },
|
"update_link": "https://github.com/iamadamdev/bypass-paywalls-firefox/releases/download/v1.5.8/bypass_paywalls-1.5.8-an+fx.xpi" },
|
||||||
{ "version": "1.5.9",
|
{ "version": "1.5.9",
|
||||||
"update_link": "https://github.com/iamadamdev/bypass-paywalls-firefox/releases/download/v1.5.9/bypass_paywalls-1.5.9-an+fx.xpi" }
|
"update_link": "https://github.com/iamadamdev/bypass-paywalls-firefox/releases/download/v1.5.9/bypass_paywalls-1.5.9-an+fx.xpi" },
|
||||||
|
{ "version": "1.6.0",
|
||||||
|
"update_link": "https://github.com/iamadamdev/bypass-paywalls-firefox/releases/download/v1.6.0/bypass_paywalls-1.6.0-an+fx.xpi" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue