Add BBC History Extra

This commit is contained in:
magnolia1234 2020-06-06 16:46:56 +02:00
parent 228961293d
commit 88a8485977
5 changed files with 17 additions and 0 deletions

View file

@ -60,6 +60,7 @@ Install add-on by downloading xpi-file.
[Wired](https://www.wired.com) -
[Scientific American](https://www.scientificamerican.com)*
#### Encyclopedia/Book library/Knowledge base
[BBC History Extra](https://www.historyextra.com) -
[Encyclopedia Britannica](https://www.britannica.com) -
[Glassdoor](https://www.glassdoor.com) -
[Loeb Classical Library](https://www.loebclassics.com) -

View file

@ -169,6 +169,7 @@ var blockedRegexes = {
'globes.co.il': /.+\.tinypass\.com\/.+/,
'haaretz.co.il': /haaretz\.co\.il\/htz\/js\/inter\.js/,
'haaretz.com': /haaretz\.com\/hdc\/web\/js\/minified\/header-scripts-int.js.+/,
'historyextra.com': /.+\.evolok\.net\/.+\/authorize\/.+/,
'ilmessaggero.it': /(utils\.cedsdigital\.it\/js\/PaywallMeter\.js|static\.viralize\.tv\/viralize_player)/,
'inquirer.com': /.+\.tinypass\.com\/.+/,
'ladepeche.fr': /.+\.poool\.fr\/.+/,

View file

@ -681,6 +681,19 @@ else if (matchDomain('bostonglobe.com')) {
}
}
else if (matchDomain('historyextra.com')) {
let article_masked = document.querySelector('.template-article__masked');
if (article_masked) {
let extra_pars = document.querySelectorAll('div.template-article__masked > p');
for (let extra_par of extra_pars) {
removeDOMElement(extra_par);
}
article_masked.classList.remove('template-article__masked');
}
let ad_banner = document.querySelector('.ad-banner-container');
removeDOMElement(ad_banner);
}
// General Functions
function removeDOMElement(...elements) {
for (let element of elements) {

View file

@ -117,6 +117,7 @@
"*://*.hbr.org/*",
"*://*.hbrtaiwan.com/*",
"*://*.heraldsun.com.au/*",
"*://*.historyextra.com/*",
"*://*.humo.be/*",
"*://*.illawarramercury.com.au/*",
"*://*.ilmanifesto.it/*",

View file

@ -7,6 +7,7 @@ var defaultSites =
"American Banker": "americanbanker.com",
"Baltimore Sun": "baltimoresun.com",
"Barron's": "barrons.com",
"BBC History Extra": "historyextra.com",
"Bendigo Advertiser": "bendigoadvertiser.com.au",
"Bloomberg": "bloomberg.com",
"Bloomberg Quint (free articles only)": "bloombergquint.com",