Fix Corriere della Sera (videos)

master
magnolia1234 2021-08-29 15:15:23 +02:00
parent f815128b48
commit a6e6bf5a43
7 changed files with 17 additions and 16 deletions

View File

@ -406,7 +406,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) -

View File

@ -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\//,

View File

@ -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)
@ -401,7 +402,7 @@ Add El Periodico de Catalunya (Spain)
Add Grupo Vocento (Spain, regional daily)
Add La Croix (France)
Add The Hindu BusinessLine (India)
Fix Corriere Della Sera (redirect preview)
Fix Corriere della Sera (redirect preview)
Fix Faz.net (error in json)
Fix LesEchos.fr (json)
Fix popup (update notification & close error)
@ -730,7 +731,7 @@ Add The Athletic UK
Add Il Messaggero (Italy)
Fix Financial Times (ft.com)
Update (custom)options UI
Fix Corriere Della Sera
Fix Corriere della Sera
Fix custom sites (domains with capitals)
Update version-check (replace innerHTML)
@ -738,7 +739,7 @@ Update version-check (replace innerHTML)
Add Aftonbladet.se
Fix Australian Community Media newspapers
Fix Economist (inactive links)
Fix Corriere Della Sera
Fix Corriere della Sera
Add link to releases (version check)
Show badge-notification for regional Ad.nl sites
Prepare release (limited permissions)
@ -770,7 +771,7 @@ Add WAtoday (Australia)
Fix TheNation paywall-script block
Refresh tab after saved options
Fix Leeuwarder Courant
Fix Corriere Della Sera
Fix Corriere della Sera
* v1.6.2.3 (2020-02-12)
Add CommonWealth Magazine Taiwan

View File

@ -38,5 +38,5 @@
"webRequestBlocking",
"<all_urls>"
],
"version": "2.3.4.5"
"version": "2.3.4.6"
}

View File

@ -536,13 +536,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"
}

View File

@ -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);

View File

@ -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",