Add LeParisien.fr

Adding French paper Le Parisien.
In cooperation with @iscreamcoke
This commit is contained in:
magnolia1234 2019-10-28 20:58:16 +01:00 committed by GitHub
parent 8ee6386efc
commit da87eddd4c
4 changed files with 17 additions and 0 deletions

View File

@ -53,6 +53,7 @@
[La Tercera](https://latercera.com)\
[L'Écho](https://lecho.be)\
[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)\

View File

@ -41,6 +41,7 @@ var defaultSites = {
'La Tercera': 'latercera.com',
'L\'Echo': 'lecho.be',
'Le Monde': 'lemonde.fr',
'Le Parisien': 'leparisien.fr',
'Les Echos': 'lesechos.fr',
'Liberation': 'liberation.fr',
'Loeb Classical Library': 'loebclassics.com',
@ -213,6 +214,7 @@ var blockedRegexes = [
/haaretz\.co\.il\/htz\/js\/inter\.js/,
/nzherald\.co\.nz\/.+\/headjs\/.+\.js/
];
///leparisien\.fr\/pf\/resources\/dist\/base\.js\?d\=103/
const userAgentDesktop = "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
const userAgentMobile = "Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible ; Googlebot/2.1 ; +http://www.google.com/bot.html)"

View File

@ -155,6 +155,19 @@ if (window.location.href.indexOf('lemonde.fr') !== -1) {
});
}
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) {
for (let element of elements) {

View File

@ -36,6 +36,7 @@ var defaultSites = {
'La Tercera': 'latercera.com',
'L\'Echo': 'lecho.be',
'Le Monde': 'lemonde.fr',
'Le Parisien': 'leparisien.fr',
'Les Echos': 'lesechos.fr',
'Liberation': 'liberation.fr',
'Loeb Classical Library': 'loebclassics.com',