Fix Corriere della Sera (videos)

merge-requests/2/head
magnolia1234 3 years ago
parent b79a8585d6
commit 9d958ada0f

@ -376,7 +376,7 @@ Grouped in options:\
[Ostsee-Zeitung](https://www.ostsee-zeitung.de)
##### Italy
[Corriere Della Sera](https://www.corriere.it) -
[Corriere della Sera](https://www.corriere.it) -
[Domani](https://editorialedomani.it) -
[GElocal.it](https://quotidiani.gelocal.it) -
[Il Fatto Quotidiano](https://www.ilfattoquotidiano.it) -

@ -56,6 +56,7 @@ var allow_cookies_default = [
'cicero.de',
'clarin.com',
'cmjornal.pt',
'corriere.it',
'dallasnews.com',
'df.cl',
'di.se',
@ -289,7 +290,7 @@ var blockedRegexes = {
'clarin.com': /js\.matheranalytics\.com\//,
'cmjornal.pt': /cdn\.ampproject\.org\/v\d\/amp-(access|(sticky-)?ad)-.+\.js/,
'commentary.org': /\.commentary\.org\/.+\/js\/dg-locker-public\.js/,
'corriere.it': /(\.tinypass\.com\/|\.rcsobjects\.it\/rcs_(cpmt|tracking-service)\/|\.corriereobjects\.it\/.+\/js\/(_paywall\.sjs|tracking\/)|\.userzoom\.com\/files\/js\/)/,
'corriere.it': /(\.tinypass\.com\/|\.corriereobjects\.it\/.+\/js\/_paywall\.sjs)/,
'dallasnews.com': /(\.blueconic\.net\/|js\.matheranalytics\.com\/)/,
'digiday.com': /cdn.\.tinypass\.com\//,
'dvhn.nl': /\.evolok\.net\/.+\/authorize\//,

@ -5,6 +5,7 @@ Post-release
Add Forbes
Add Law360 (free articles only)
Fix Bloomberg (graphics)
Fix Corriere della Sera (videos)
Fix Repubblica.it (podcasts)
* v2.3.4.1 (2021-08-23)

@ -548,13 +548,11 @@
"*://*.natgeofe.com/*",
"*://*.nyt.com/*",
"*://*.pasedigital.cl/*",
"*://*.rcsobjects.it/*",
"*://*.repstatic.it/*",
"*://*.rndtech.de/*",
"*://*.sanoma-sndp.fi/*",
"*://*.userzoom.com/*",
"*://*.wallkit.net/*",
"*://*.wsj.net/*"
],
"version": "2.3.4.5"
"version": "2.3.4.6"
}

@ -36,7 +36,6 @@ function renderOptions() {
var sites = items.sites;
var sites_excluded = items.sites_excluded;
var sitesEl = document.getElementById('bypass_sites');
var clean_key;
for (var key in defaultSites) {
if (!defaultSites.hasOwnProperty(key)) {
continue;
@ -47,8 +46,7 @@ function renderOptions() {
inputEl.type = 'checkbox';
inputEl.dataset.key = key;
inputEl.dataset.value = value;
clean_key = key.replace(/\s\(.*\)/, '');
inputEl.checked = Object.keys(sites).some(title => (title.replace(/\s\(.*\)/, '') === clean_key)) && !sites_excluded.includes(value);
inputEl.checked = Object.keys(sites).some(title => keyCompare(title, key)) && !sites_excluded.includes(value);
if (value !== '###') {
labelEl.appendChild(inputEl);
} else {
@ -75,8 +73,7 @@ function renderOptions() {
inputEl.type = 'checkbox';
inputEl.dataset.key = key;
inputEl.dataset.value = domain;
clean_key = key.replace(/\s\(.*\)/, '');
inputEl.checked = Object.keys(sites).some(title => (title.replace(/\s\(.*\)/, '') === clean_key)) && !sites_excluded.includes(domain);
inputEl.checked = Object.keys(sites).some(title => keyCompare(title, key)) && !sites_excluded.includes(domain);
if (value !== '' && value !== '###') {
labelEl.appendChild(inputEl);
}
@ -123,6 +120,10 @@ function closeButton() {
open(location).close();
}
function keyCompare(firstStr, secondStr) {
return firstStr.toLowerCase().replace(/\s\(.*\)/, '') === secondStr.toLowerCase().replace(/\s\(.*\)/, '')
}
document.addEventListener('DOMContentLoaded', renderOptions);
document.getElementById('save').addEventListener('click', save_options);
document.getElementById('select-all').addEventListener('click', selectAll);

@ -38,7 +38,7 @@ var defaultSites =
"Commentary Magazine": "commentary.org",
"CommonWealth Magazine Taiwan": "cw.com.tw",
"Correio da Manhã": "cmjornal.pt",
"Corriere Della Sera": "corriere.it",
"Corriere della Sera": "corriere.it",
"Crain Communications": "###_usa_craincomm",
"Dagblad van het Noorden": "dvhn.nl",
"Dagens Industri": "di.se",

Loading…
Cancel
Save