Add ilFattoQuotidiano.it

This commit is contained in:
magnolia1234 2020-06-27 13:49:37 +02:00
parent 4974f8dfea
commit 4815ed729b
5 changed files with 27 additions and 1 deletions

View File

@ -181,6 +181,7 @@ Install add-on by downloading xpi-file.
[Handelsblatt](https://www.handelsblatt.com)
##### Italy
[Corriere Della Sera](https://www.corriere.it) -
[Il Fatto Quotidiano](https://www.ilfattoquotidiano.it) -
[Il Manifesto](https://ilmanifesto.it) -
[Il Messaggero](https://www.ilmessaggero.it) -
[La Repubblica](https://www.repubblica.it) -

View File

@ -41,6 +41,7 @@ var allow_cookies = [
'handelsblatt.com',
'heraldsun.com.au',
'humo.be',
'ilfattoquotidiano.it',
'independent.ie',
'inkl.com',
'intelligentinvestor.com.au',

View File

@ -749,6 +749,28 @@ else if (matchDomain('knack.be')) {
}
}
else if (matchDomain('ilfattoquotidiano.it')) {
window.setTimeout(function () {
let subscribe = document.querySelector('.article-ifq-bottom-pro-sostenitore');
removeDOMElement(subscribe);
let paywall = document.querySelector('.read-more');
if (paywall) {
if (window.location.href.includes('?'))
window.location.href = window.location.href.replace('?', 'amp/?');
else
window.location.href = window.location.href + 'amp';
}
if (window.location.href.includes('/amp/')) {
let section_not_granted = document.querySelector('section[subscriptions-section="content-not-granted"]');
let comments = document.querySelector('div.content.comments');
removeDOMElement(section_not_granted, comments);
let hidden_content = document.querySelector('section[subscriptions-section="content"]');
if (hidden_content)
hidden_content.setAttribute('style', 'display:block !important;');
}
}, 500); // Delay (in milliseconds)
}
// General Functions
function removeDOMElement(...elements) {
for (let element of elements) {

View File

@ -110,6 +110,7 @@
"*://*.historyextra.com/*",
"*://*.humo.be/*",
"*://*.illawarramercury.com.au/*",
"*://*.ilfattoquotidiano.it/*",
"*://*.ilmanifesto.it/*",
"*://*.ilmessaggero.it/*",
"*://*.inc.com/*",

View File

@ -61,10 +61,11 @@ var defaultSites =
"Herald Sun": "heraldsun.com.au",
"Het Financieel Dagblad": "fd.nl",
"Humo.be": "humo.be",
"Inc.com": "inc.com",
"Il Fatto Quotidiano": "ilfattoquotidiano.it",
"Il Manifesto": "ilmanifesto.it",
"Il Messaggero": "ilmessaggero.it",
"Illawarra Mercury": "illawarramercury.com.au",
"Inc.com": "inc.com",
"Inkl": "inkl.com",
"Intelligent Investor": "intelligentinvestor.com.au",
"Irish Independent": "independent.ie",