mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-10 04:01:58 +01:00
Add New Left Review (United Kingdom)
This commit is contained in:
parent
5dfed2a54b
commit
b7d68fda20
6 changed files with 38 additions and 2 deletions
|
@ -160,6 +160,7 @@ Visit the [Chrome repository](https://gitlab.com/magnolia1234/bypass-paywalls-ch
|
|||
[Financial Times](https://www.ft.com) -
|
||||
[Irish Independent](https://www.independent.ie) -
|
||||
[London Review of Books](https://www.lrb.co.uk) -
|
||||
[New Left Review](https://newleftreview.org) -
|
||||
[The Economist](https://www.economist.com) -
|
||||
[The Irish Times](https://www.irishtimes.com) -
|
||||
[The New Statesman](https://www.newstatesman.com) -
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
var ext_api = (typeof browser === 'object') ? browser : chrome;
|
||||
var ext_name = ext_api.runtime.getManifest().name;
|
||||
|
||||
const cs_limit_except = ['afr.com', 'elcomercio.pe', 'elpais.com', 'faz.net', 'gestion.pe', 'harpers.org', 'inkl.com', 'la-croix.com', 'lescienze.it', 'techinasia.com'];
|
||||
const cs_limit_except = ['afr.com', 'elcomercio.pe', 'elpais.com', 'faz.net', 'gestion.pe', 'harpers.org', 'inkl.com', 'la-croix.com', 'lescienze.it', 'newleftreview.org', 'techinasia.com'];
|
||||
var currentTabUrl = '';
|
||||
var csDone = false;
|
||||
|
||||
|
@ -81,6 +81,7 @@ var allow_cookies_default = [
|
|||
'nationalgeographic.com',
|
||||
'nationalpost.com',
|
||||
'nationalreview.com',
|
||||
'newleftreview.org',
|
||||
'newrepublic.com',
|
||||
'noordhollandsdagblad.nl',
|
||||
'nouvelobs.com',
|
||||
|
|
|
@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Firefox
|
|||
|
||||
Post-release
|
||||
Add group TorStar (Canada)
|
||||
Add New Left Review (United Kingdom)
|
||||
Fix-update Toronto Star (overlay)
|
||||
Update options (excluded sites)
|
||||
|
||||
|
|
|
@ -1891,6 +1891,37 @@ else if (matchDomain('seekingalpha.com')) {
|
|||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('newleftreview.org')) {
|
||||
let url = window.location.href;
|
||||
let paywall = document.querySelector('div.promo-wrapper');
|
||||
if (paywall) {
|
||||
let proxyurl = 'https://cors-anywhere.herokuapp.com/';
|
||||
let nlr_cache = 'https://webcache.googleusercontent.com/search?q=cache:' + url.split('//')[1];
|
||||
fetch(proxyurl + nlr_cache, { headers: {"Content-Type": "text/plain", "X-Requested-With": "XMLHttpRequest" } })
|
||||
.then(response => {
|
||||
let article_old = document.querySelector('div.article-page');
|
||||
let footer = document.querySelector('div.article-footer');
|
||||
if (response.ok) {
|
||||
response.text().then(html => {
|
||||
let parser = new DOMParser();
|
||||
let doc = parser.parseFromString(html, 'text/html');
|
||||
let json = doc.querySelector('div.article-page');
|
||||
if (json) {
|
||||
if (article_old && footer) {
|
||||
removeDOMElement(article_old);
|
||||
footer.parentElement.insertBefore(json, footer);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (article_old && footer)
|
||||
article_old.appendChild(document.createTextNode('Article not yet in Google webcache ...'));
|
||||
}
|
||||
});
|
||||
removeDOMElement(paywall);
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('lavanguardia.com')) {
|
||||
let paywall = document.querySelector('[class*="ev-open-modal-paywall"]');
|
||||
let infinite_loading = document.querySelector('#infinite-loading');
|
||||
|
|
|
@ -256,6 +256,7 @@
|
|||
"*://*.nautil.us/*",
|
||||
"*://*.neuepresse.de/*",
|
||||
"*://*.newcastleherald.com.au/*",
|
||||
"*://*.newleftreview.org/*",
|
||||
"*://*.newrepublic.com/*",
|
||||
"*://*.news-gazette.com/*",
|
||||
"*://*.news-mail.com.au/*",
|
||||
|
@ -420,5 +421,5 @@
|
|||
"*://*.repstatic.it/*",
|
||||
"*://*.userzoom.com/*"
|
||||
],
|
||||
"version": "2.0.2.3"
|
||||
"version": "2.0.2.4"
|
||||
}
|
1
sites.js
1
sites.js
|
@ -138,6 +138,7 @@ var defaultSites =
|
|||
"National Review": "nationalreview.com",
|
||||
"Nautilus": "nautil.us",
|
||||
"Neue Zürcher Zeitung": "nzz.ch",
|
||||
"New Left Review": "newleftreview.org",
|
||||
"New York Magazine (+ Grub Street, The Cut & Vulture)": "###_usa_nymag",
|
||||
"New Zealand Herald": "nzherald.co.nz",
|
||||
"Newsweek": "newsweek.com",
|
||||
|
|
Loading…
Reference in a new issue