Add The New York Review of Books

merge-requests/1/head
magnolia1234 4 years ago
parent 36cc0519fe
commit ffb2ac2d38

@ -31,6 +31,7 @@ So don't update to Firefox 79 or use Firefox Nightly (and load BPC from a custom
[The Christian Science Monitor](https://www.csmonitor.com) -
[The Nation](https://www.thenation.com) -
[The New Republic](https://newrepublic.com) -
[The New York Review of Books](https://www.nybooks.com) -
[The New York Times](https://www.nytimes.com) -
[The New Yorker](https://www.newyorker.com) -
[The Washington Post](https://www.washingtonpost.com) -

@ -63,6 +63,7 @@ var allow_cookies = [
'nknews.org',
'noordhollandsdagblad.nl',
'nrz.de',
'nybooks.com',
'nytimes.com',
'nzz.ch',
'parool.nl',

@ -2,6 +2,7 @@
Changelog Bypass Paywalls Clean - Firefox
Post-release
Add The New York Review of Books
* v1.9.1.1 (2020-10-19)
Hotfix remove cookies (www)

@ -815,15 +815,17 @@ else if (matchDomain('faz.net')) {
str = str.replace(/(?:^|[\w\"\“])(\.|\?|!)(?=[A-ZÖÜ\„][A-Za-zÀ-ÿ\„]{1,})/gm, "$&\n\n");
str = str.replace(/([a-z\"\“])(?=[A-Z](?=[A-Za-zÀ-ÿ]+))/gm, "$&\n\n");
// exceptions: names with alternating lower/uppercase (no general fix)
str = str.replace(/Glaxo\n\nSmith\n\nKline/g, "GlaxoSmithKline");
str = str.replace(/Ba\n\nFin/g, "BaFin");
str = str.replace(/Bil\n\nMoG/g, "BilMoG");
str = str.replace(/Eu\n\nGH/g, "EuGH");
str = str.replace(/If\n\nSG/g, "IfSG");
str = str.replace(/med\n\nRxiv/g, "medRxiv");
str = str.replace(/m\n\nRNA/g, "mNRA");
str = str.replace(/St\n\nVO/g, "StVO");
str = str.replace(/Berl\n\nHG/g, "BerlHG");
let str_rep_arr = ["BaFin", "BerlHG", "BilMoG", "EuGH", "GlaxoSmithKline", "IfSG", "iMessage", "iOS", "iPad", "iPhone", "medRxiv", "mNRA", "StVO"];
let str_rep_split, str_rep_src;
for (let str_rep of str_rep_arr) {
str_rep_split = str_rep.split(/([a-z]+)(?=[A-Z](?=[A-Za-z]+))/);
str_rep_src = str_rep_split.reduce(function (accumulator, currentValue) {
return accumulator + currentValue + ((currentValue !== currentValue.toUpperCase()) ? '\n\n' : '');
});
if (str_rep_src.endsWith('\n\n'))
str_rep_src = str_rep_src.slice(0, -2);
str = str.replace(new RegExp(str_rep_src, "g"), str_rep);
}
str = str.replace(/De\n\n([A-Z])/g, "De$1");
str = str.replace(/La\n\n([A-Z])/g, "La$1");
str = str.replace(/Le\n\n([A-Z])/g, "Le$1");
@ -1382,6 +1384,12 @@ else if (matchDomain("quotidiano.net")) {
}
}
else if (matchDomain("nybooks.com")) {
let paywall_article = document.querySelector('.paywall-article');
if (paywall_article)
paywall_article.classList.remove('paywall-article');
}
// General Functions
function removeDOMElement(...elements) {
for (let element of elements) {

@ -196,6 +196,7 @@
"*://*.nrc.nl/*",
"*://*.nrz.de/*",
"*://*.ntnews.com.au/*",
"*://*.nybooks.com/*",
"*://*.nymag.com/*",
"*://*.nytimes.com/*",
"*://*.nzherald.co.nz/*",
@ -329,5 +330,5 @@
"webRequest",
"webRequestBlocking"
],
"version": "1.9.1.1"
"version": "1.9.1.2"
}

@ -176,6 +176,7 @@ var defaultSites =
"The Nation": "thenation.com",
"The New Republic": "newrepublic.com",
"The New Statesman": "newstatesman.com",
"The New York Review of Books": "nybooks.com",
"The New York Times": "nytimes.com",
"The New Yorker": "newyorker.com",
"The News-Gazette": "news-gazette.com",

Loading…
Cancel
Save