Add Italian.tech

This commit is contained in:
magnolia1234 2021-11-15 18:13:46 +01:00
parent e89730308f
commit 7508a2e4fc
8 changed files with 29 additions and 14 deletions

View file

@ -399,6 +399,7 @@ Grouped in options:\
[Il Fatto Quotidiano](https://www.ilfattoquotidiano.it) -
[Il Manifesto](https://ilmanifesto.it) -
[Il Secolo XIX](https://www.ilsecoloxix.it) -
[Italian.tech](https://www.italian.tech) -
[La Nuova Sardegna](https://www.lanuovasardegna.it) -
[La Repubblica](https://www.repubblica.it) -
[La Stampa](https://www.lastampa.it) -

View file

@ -841,7 +841,7 @@ if (matchUrlDomain(change_headers, details.url) && (!['font', 'image', 'styleshe
setReferer = true;
}
if (requestHeader.name === 'User-Agent') {
useUserAgentMobile = requestHeader.value.toLowerCase().includes("mobile") && !matchUrlDomain(['telerama.fr'], details.url);
useUserAgentMobile = requestHeader.value.toLowerCase().includes("mobile") && !matchUrlDomain(['telerama.fr'].concat(it_repubblica_domains), details.url);
}
return requestHeader;
});

View file

@ -2,6 +2,7 @@
Changelog Bypass Paywalls Clean - Firefox
Post-release
Add Italian.tech
* v2.4.4.0 (2021-11-14)
Fix Nikkei Asian Review (cookies)

View file

@ -14,7 +14,7 @@ var es_unidad_domains = ['elmundo.es', 'expansion.com', 'marca.com'];
var fi_alma_talent_domains = ['arvopaperi.fi', 'iltalehti.fi', 'kauppalehti.fi', 'marmai.fi', 'mediuutiset.fi', 'mikrobitti.fi', 'talouselama.fi', 'tekniikkatalous.fi', 'tivi.fi', 'uusisuomi.fi'];
var fr_groupe_ebra_domains = ['bienpublic.com', 'dna.fr', 'estrepublicain.fr', 'lalsace.fr', 'ledauphine.com', 'lejsl.com', 'leprogres.fr', 'republicain-lorrain.fr', 'vosgesmatin.fr'];
var fr_groupe_la_depeche_domains = ['centrepresseaveyron.fr', 'ladepeche.fr', 'lindependant.fr', 'midi-olympique.fr', 'midilibre.fr', 'nrpyrenees.fr', 'petitbleu.fr'];
var it_repubblica_domains = ['gelocal.it', 'ilsecoloxix.it', 'lanuovasardegna.it', 'lastampa.it', 'limesonline.com', 'repubblica.it'];
var it_repubblica_domains = ['gelocal.it', 'ilsecoloxix.it', 'italian.tech', 'lanuovasardegna.it', 'lastampa.it', 'repubblica.it'];
var it_quotidiano_domains = ['ilgiorno.it', 'ilrestodelcarlino.it', 'iltelegrafolivorno.it', 'lanazione.it', 'quotidiano.net'];
var nl_mediahuis_region_domains = ['gooieneemlander.nl', 'haarlemsdagblad.nl', 'ijmuidercourant.nl', 'leidschdagblad.nl', 'noordhollandsdagblad.nl'];
var no_nhst_media_domains = ['intrafish.com', 'rechargenews.com', 'tradewindsnews.com', 'upstreamonline.com'];
@ -1068,7 +1068,7 @@ else if (matchDomain('sudouest.fr')) {
else
csDone = true;
} else if (window.location.hostname.endsWith('.it') || matchDomain(['limesonline.com', 'quotidiano.net'])) {//italy
} else if (window.location.hostname.endsWith('.it') || matchDomain(['italian.tech', 'limesonline.com', 'quotidiano.net'])) {//italy
if (matchDomain('corriere.it')) {
let url = window.location.href;
@ -1171,6 +1171,8 @@ else if (domain = matchDomain(it_repubblica_domains)) {
}, 1000); // Delay (in milliseconds)
}
}
let ads = document.querySelectorAll('div[id^="adv"]');
removeDOMElement(...ads);
} else {
let paywall;
if (['lastampa.it', 'repubblica.it'].includes(domain)) {

View file

@ -246,6 +246,7 @@
"*://*.inquirer.com/*",
"*://*.intelligentinvestor.com.au/*",
"*://*.intrafish.com/*",
"*://*.italian.tech/*",
"*://*.japantimes.co.jp/*",
"*://*.journaldunet.com/*",
"*://*.journalnow.com/*",
@ -558,5 +559,5 @@
"*://*.wallkit.net/*",
"*://*.wsj.net/*"
],
"version": "2.4.4.0"
"version": "2.4.4.1"
}

View file

@ -229,7 +229,7 @@ function renderOptions() {
}, function (items) {
var sites_custom = items.sites_custom;
var sites_updated = items.sites_updated;
var sites_updated_new = Object.keys(sites_updated).filter(x => !defaultSites_domains.includes(x.domain));
var sites_updated_domains_new = Object.values(sites_updated).filter(x => (x.domain && !defaultSites_domains.includes(x.domain) || x.group)).map(x => x.group ? x.group.filter(y => !defaultSites_domains.includes(y)) : x.domain).flat();
var sitesEl = document.getElementById('bypass_sites');
sitesEl.innerHTML = '';
var labelEl = document.createElement('label');
@ -301,7 +301,7 @@ function renderOptions() {
for (let key in sites_custom) {
optionEl = document.createElement('option');
let domain = sites_custom[key]['domain'];
perm_origins.push('*://*.' + domain + '/*');
perm_origins.push(domain);
let isDefaultSite = defaultSites_domains.includes(domain);
optionEl.text = isDefaultSite ? '*' : '';
optionEl.text += key + ': ' + domain +
@ -318,11 +318,13 @@ function renderOptions() {
}
labelEl.appendChild(selectEl);
custom_sitesEl.appendChild(labelEl);
for (let key in sites_updated_new) {
let domain = sites_updated_new[key]['domain'];
if (!perm_origins.includes(domain))
perm_origins.push('*://*.' + domain + '/*');
if (sites_updated_domains_new.length > 0) {
labelEl = document.createElement('p');
labelEl.appendChild(document.createElement('label'));
labelEl.appendChild(document.createTextNode('Updated sites: ' + sites_updated_domains_new.join()));
custom_sitesEl.appendChild(labelEl);
perm_origins = perm_origins.concat(sites_updated_domains_new).map(x => '*://*.' + x + '/*');
}
var perm_custom = document.getElementById('perm-custom');
@ -335,7 +337,7 @@ function renderOptions() {
perm_custom.innerText = 'NO';
}
});
});
});
var custom_enabled = document.getElementById('custom-enabled');
ext_api.permissions.contains({

View file

@ -689,6 +689,10 @@ var defaultSites = {
allow_cookies: 1,
block_regex: /(cdn\.flip-pay\.com\/clients\/inm\/flip-pay\.js|cdn\.ampproject\.org\/v\d\/amp-(access|ad|consent)-.+\.js)/
},
"Italian.tech": {
domain: "italian.tech",
group_rule: "###_gr_it_repubblica_domains"
},
"Knack.be": {
domain: "knack.be",
allow_cookies: 1,
@ -1617,7 +1621,7 @@ var defaultSites = {
block_regex: /cdn\.ampproject\.org\/v\d\/amp-(access|(sticky-)?ad|consent|subscriptions)-.+\.js/
},
"###_gr_it_repubblica_domains": {
group_rule_domains: ["gelocal.it", "ilsecoloxix.it", "lanuovasardegna.it", "lastampa.it", "limesonline.com", "repubblica.it"],
group_rule_domains: ["gelocal.it", "ilsecoloxix.it", "italian.tech", "lanuovasardegna.it", "lastampa.it", "lescienze.it", "limesonline.com", "repubblica.it"],
allow_cookies: 1,
block_regex: /(scripts\.repubblica\.it\/pw\/pw\.js|cdn\.ampproject\.org\/v\d\/amp-(access|ad|user-notification)-.+\.js)/,
useragent: "googlebot"
@ -1754,7 +1758,7 @@ var grouped_sites = {};
expandSiteRules(defaultSites);
// grouped domains (background)
var it_repubblica_domains = defaultSites['###_gr_it_repubblica_domains']['group_rule_domains'].concat(['lescienze.it']);
var it_repubblica_domains = defaultSites['###_gr_it_repubblica_domains']['group_rule_domains'];
var nl_mediahuis_region_domains = grouped_sites['###_nl_mediahuis_region'];
var no_nhst_media_domains = grouped_sites['###_no_nhst_media'];
var usa_theathletic_domains = grouped_sites['###_usa_theathletic'];

View file

@ -1,2 +1,6 @@
{
"Italian.tech": {
"domain": "italian.tech",
"group_rule": "###_gr_it_repubblica_domains"
}
}