Fix The Week (css)

Update custom sites (import - remove obsolete)
This commit is contained in:
magnolia1234 2023-09-18 08:20:00 +02:00
parent a53d4fbbb1
commit 3249a8a294
11 changed files with 82 additions and 23 deletions

View file

@ -444,7 +444,6 @@ Grouped in options:\
[The Telegraph](https://www.telegraph.co.uk) -
[The Times (link to archive.is)](https://www.thetimes.co.uk) -
[The Times Literary Supplement](https://www.the-tls.co.uk) -
[The Week](https://www.theweek.co.uk) -
[UnHerd](https://unherd.com)
Grouped in options:\
@ -969,7 +968,7 @@ Remember to check the [previous requests](https://gitlab.com/magnolia1234/bypass
3. Disable Javascript on the site (by browser, uBlock Origin or other add-on).
4. Add the domain as custom site for more bypass options.
5. Open page in reader view (by browser or add-on).
6. Try one of the archive sites (for Google Search Tool test url & copy html (tab) code to https://codebeautify.org/htmlviewer or https://html.onlineviewer.net).
6. Try one of the archive sites (for Google Search Tool test url & copy html (tab) code to https://codebeautify.org/htmlviewer).
### Add custom site
Add your own custom site (also for testing).

View file

@ -373,7 +373,7 @@ function set_rules(sites, sites_updated, sites_custom) {
if (!custom) {
let isCustomSite = matchDomain(customSites_domains, domain);
let customSite_title = isCustomSite ? Object.keys(customSites).find(key => customSites[key].domain === isCustomSite) : '';
if (customSite_title && !(rule.add_ext_link || ['swarajyamag.com', 'vikatan.com'].includes(isCustomSite))) {
if (customSite_title && !(rule.add_ext_link || customSitesExt_remove.includes(isCustomSite))) {
// add default block_regex
let block_regex_default = '';
if (rule.hasOwnProperty('block_regex'))
@ -468,7 +468,8 @@ ext_api.storage.local.get({
sites[site_new] = defaultSites[site_new].domain;
// reset ungrouped sites
let ungrouped_sites = {
'The Athletic': 'theathletic.com'
'The Athletic': 'theathletic.com',
'The Week (regwall)': 'theweek.com'
};
for (let key in ungrouped_sites) {
if (sites[key] && sites[key] !== ungrouped_sites[key])
@ -1149,6 +1150,8 @@ function check_sites_custom_ext() {
if (response.ok) {
response.json().then(json => {
customSitesExt = Object.values(json).map(x => x.domain);
if (json['###_remove_sites'] && json['###_remove_sites'].cs_code)
customSitesExt_remove = json['###_remove_sites'].cs_code.split(/,\s?/);
})
}
}).catch(function (err) {
@ -1157,6 +1160,7 @@ function check_sites_custom_ext() {
}
var customSitesExt = [];
var customSitesExt_remove = [];
var sites_custom_ext_json = 'custom/sites_custom.json';
ext_api.tabs.onUpdated.addListener(function (tabId, info, tab) { updateBadge(tab); });

View file

@ -3,6 +3,8 @@ Changelog Bypass Paywalls Clean - Firefox
Updates (install signed xpi-file): https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/releases
Post-release
Fix The Week (css)
Update custom sites (import - remove obsolete)
* v3.3.4.0 (2023-09-17)
Add Cambio Colombia

View file

@ -50,7 +50,7 @@ var usa_outside_mag_domains = ["backpacker.com", "betamtb.com", "betternutrition
var usa_tribune_domains = ['baltimoresun.com', 'chicagotribune.com', 'courant.com', 'dailypress.com', 'mcall.com', 'nydailynews.com', 'orlandosentinel.com', 'pilotonline.com', 'sun-sentinel.com'];
// clean local storage of sites (with an exemption for hold-list)
var arr_localstorage_hold = ['augsburger-allgemeine.de', 'barrons.com', 'business-standard.com', 'businessinsider.com', 'businessoffashion.com', 'businesspost.ie', 'challenges.fr', 'charliehebdo.fr', 'cmjornal.pt', 'corriere.it', 'corrieredellosport.it', 'cyclingtips.com', 'dvhn.nl', 'economictimes.com', 'eldiario.es', 'elespanol.com', 'elle.fr', 'elpais.com', 'elperiodico.com', 'enotes.com', 'estadao.com.br', 'forbes.com', 'fortune.com', 'freiepresse.de', 'gauchazh.clicrbs.com.br', 'globo.com', 'ilfoglio.it', 'inc42.com', 'indianexpress.com', 'indiatoday.in', 'ksta.de', 'kurier.at', 'lanouvellerepublique.fr', 'latimes.com', 'lc.nl', 'lesechos.fr', 'livemint.com', 'mid-day.com', 'mundodeportivo.com', 'nationalreview.com', 'nrc.nl', 'nw.de', 'nwzonline.de', 'nytimes.com', 'nzherald.co.nz', 'record.pt', 'ruhrnachrichten.de', 'rundschau-online.de', 'sandiegouniontribune.com', 'scmp.com', 'seekingalpha.com', 'telegraph.co.uk', 'tes.com', 'theatlantic.com', 'thebulletin.org', 'thecritic.co.uk', 'thetimes.co.uk', 'uol.com.br', 'wsj.com'].concat(be_roularta_domains, ca_gcm_domains, ca_torstar_domains, de_funke_medien_domains, de_lv_domains, de_vrm_domains, de_vrm_custom_domains, de_westfalen_medien_domains, es_epiberica_domains, es_epiberica_custom_domains, es_grupo_vocento_domains, es_unidad_domains, fr_groupe_ebra_domains, fr_groupe_la_depeche_domains, fr_groupe_nice_matin_domains, it_gedi_domains, it_quotidiano_domains, nl_dpg_media_domains, no_nhst_media_domains, timesofindia_domains, usa_hearst_comm_domains, usa_mcc_domains);
var arr_localstorage_hold = ['augsburger-allgemeine.de', 'barrons.com', 'business-standard.com', 'businessinsider.com', 'businessoffashion.com', 'businesspost.ie', 'challenges.fr', 'charliehebdo.fr', 'cmjornal.pt', 'corriere.it', 'corrieredellosport.it', 'cyclingtips.com', 'dvhn.nl', 'economictimes.com', 'eldiario.es', 'elespanol.com', 'elle.fr', 'elpais.com', 'elperiodico.com', 'enotes.com', 'estadao.com.br', 'forbes.com', 'fortune.com', 'freiepresse.de', 'gauchazh.clicrbs.com.br', 'globo.com', 'ilfoglio.it', 'inc42.com', 'indianexpress.com', 'indiatoday.in', 'ksta.de', 'kurier.at', 'lanouvellerepublique.fr', 'latimes.com', 'lc.nl', 'lesechos.fr', 'livemint.com', 'mid-day.com', 'mundodeportivo.com', 'nationalreview.com', 'nrc.nl', 'nw.de', 'nwzonline.de', 'nytimes.com', 'nzherald.co.nz', 'record.pt', 'ruhrnachrichten.de', 'rundschau-online.de', 'sandiegouniontribune.com', 'scmp.com', 'seekingalpha.com', 'telegraph.co.uk', 'tes.com', 'theatlantic.com', 'thebulletin.org', 'thecritic.co.uk', 'thetimes.co.uk', 'theweek.com', 'uol.com.br', 'wsj.com'].concat(be_roularta_domains, ca_gcm_domains, ca_torstar_domains, de_funke_medien_domains, de_lv_domains, de_vrm_domains, de_vrm_custom_domains, de_westfalen_medien_domains, es_epiberica_domains, es_epiberica_custom_domains, es_grupo_vocento_domains, es_unidad_domains, fr_groupe_ebra_domains, fr_groupe_la_depeche_domains, fr_groupe_nice_matin_domains, it_gedi_domains, it_quotidiano_domains, nl_dpg_media_domains, no_nhst_media_domains, timesofindia_domains, usa_hearst_comm_domains, usa_mcc_domains);
if (!matchDomain(arr_localstorage_hold)) {
window.localStorage.clear();
}
@ -1248,7 +1248,7 @@ else if (matchDomain('ruhrnachrichten.de') || document.querySelector('a.mgw-logo
}
else if (matchDomain(de_vrm_domains) || matchDomain(de_vrm_custom_domains)) {
let ads = document.querySelectorAll('div.adSlot');
let ads = document.querySelectorAll('div.adSlot, div.loadingBanner');
hideDOMElement(...ads);
}
@ -5189,6 +5189,14 @@ else if (matchDomain('theverge.com')) {
}
}
else if (matchDomain('theweek.com')) {
let paywall = document.querySelector('div.kiosq-main-layer');
removeDOMElement(paywall);
let locker = document.querySelector('div.paywall-locker');
if (locker)
locker.classList.remove('paywall-locker');
}
else if (matchDomain('thewrap.com')) {
let paywall = document.querySelector('div#zephr-payment-form-root');
if (paywall && dompurify_loaded) {
@ -5832,7 +5840,7 @@ function googleWebcacheLink(url, text_fail = 'BPC > Try for full article text:\r
return externalLink(['webcache.googleusercontent.com'], 'https://{domain}/search?q=cache:{url}', url, text_fail);
}
function googleSearchToolLink(url, text_fail = 'BPC > Full article text (test url & copy html (tab) code to [https://codebeautify.org/htmlviewer] or [https://html.onlineviewer.net]):\r\n') {
function googleSearchToolLink(url, text_fail = 'BPC > Full article text (test url & copy html (tab) code to [https://codebeautify.org/htmlviewer]:\r\n') {
return externalLink(['search.google.com'], 'https://search.google.com/test/rich-results?url={url}', encodeURIComponent(url), text_fail);
}

View file

@ -51,5 +51,5 @@
"webRequestBlocking",
"*://*/*"
],
"version": "3.3.4.0"
"version": "3.3.4.2"
}

View file

@ -1,4 +1,8 @@
{
"###_remove_sites": {
"cs_code": "africaintelligence.fr, bild.de, handelsblatt.com, intelligenceonline.com, intelligenceonline.fr, jeuneafrique.com, lalettrea.fr, lastampa.it, lavozdegalicia.es, law360.com, manager-magazin.de, ouest-france.fr, repubblica.it, risk.net, saechsische.de, swarajyamag.com, theweek.com, vikatan.com",
"domain": "###"
},
"Abajournal.com": {
"allow_cookies": 1,
"block_regex": "\\.piano\\.io",
@ -68,6 +72,13 @@
"cs_code": "[{\"cond\":\"div.text-gradient\", \"rm_class\":\"text-gradient\"}]",
"domain": "businessam.be"
},
"Businessinsider.de": {
"add_ext_link": "div.piano-article__paywall|div.piano-article__content>p",
"add_ext_link_type": "google_search_tool",
"allow_cookies": 1,
"block_regex": "\\.tinypass\\.com",
"domain": "businessinsider.de"
},
"Businessnews.com.au": {
"allow_cookies": 1,
"domain": "businessnews.com.au",
@ -118,6 +129,12 @@
"domain": "dealstreetasia.com",
"ld_json_next": "div.subscribe-now|article"
},
"Deutsche-wirtschafts-nachrichten.de": {
"add_ext_link": "div#article-teaser-blocks|div.teaser_extra",
"add_ext_link_type": "google_search_tool",
"allow_cookies": 1,
"domain": "deutsche-wirtschafts-nachrichten.de"
},
"Diabeteshealth.co.in": {
"allow_cookies": 1,
"domain": "diabeteshealth.co.in",
@ -128,6 +145,12 @@
"domain": "diariodenavarra.es",
"ld_json": "div#paywall_message|div.free-html"
},
"Die-glocke.de": {
"add_ext_link": "div.cardPw|div.mainContent",
"add_ext_link_type": "google_search_tool",
"allow_cookies": 1,
"domain": "die-glocke.de"
},
"Doorbraak.be": {
"allow_cookies": 1,
"cs_code": "[{\"cond\":\"div#aanbod-nieuwe-abonnee\",\"rm_elem\":1,\"elems\":[{\"cond\":\"div#excerpt-inhoud-abo\",\"rm_elem\":1},{\"cond\":\"div#plus-inhoud\",\"rm_attrib\":\"style\"}]}]",
@ -305,6 +328,12 @@
"cs_code": "[{\"cond\":\"div.td-post-content\", \"rm_class\": \"td-post-content\"}]",
"domain": "limerickpost.ie"
},
"Limesonline.com": {
"add_ext_link": "iframe#__limio_frame|div.sommario",
"add_ext_link_type": "google_search_tool",
"allow_cookies": 1,
"domain": "limesonline.com"
},
"Lindipendente.online": {
"allow_cookies": 1,
"domain": "lindipendente.online",
@ -439,6 +468,12 @@
"Physicsworld.com": {
"domain": "physicsworld.com"
},
"Politiken.dk": {
"add_ext_link": "div.stopsign|div.article__body",
"add_ext_link_type": "google_search_tool",
"allow_cookies": 1,
"domain": "politiken.dk"
},
"Portfolio.hu": {
"add_ext_link": "section.paywall|article",
"add_ext_link_type": "archive.is",

View file

@ -680,7 +680,6 @@
"*://*.thestate.com/*",
"*://*.thetimes.co.uk/*",
"*://*.theverge.com/*",
"*://*.theweek.co.uk/*",
"*://*.theweek.com/*",
"*://*.thewest.com.au/*",
"*://*.thewrap.com/*",
@ -795,5 +794,5 @@
"*://*.wyleex.com/*",
"*://webcache.googleusercontent.com/*"
],
"version": "3.3.4.0"
"version": "3.3.4.2"
}

View file

@ -86,7 +86,7 @@ function renderOptions() {
let sites_arr = site_types[site_type].sites;
for (let key in sites_arr) {
let domain = sites_arr[key]['domain'];
if (!domain || (!site_types[site_type].default_sites && (defaultSites.hasOwnProperty(key) || defaultSites_domains.includes(domain))))
if (!domain || (key === '###_remove_sites') || (!site_types[site_type].default_sites && (defaultSites.hasOwnProperty(key) || defaultSites_domains.includes(domain))))
continue;
labelEl = document.createElement('label');
let inputEl = document.createElement('input');

View file

@ -88,12 +88,19 @@ function import_json(result) {
}, function (items) {
var sites_custom = items.sites_custom;
var sites_custom_new = JSON.parse(result);
var customSitesExt_remove = [];
if (sites_custom_new['###_remove_sites'] && sites_custom_new['###_remove_sites'].cs_code)
customSitesExt_remove = sites_custom_new['###_remove_sites'].cs_code.split(/,\s?/);
for (let site in sites_custom_new) {
if (customSitesExt_remove.includes(site.domain))
delete sites_custom[site];
else {
let customSite_diff = Object.keys(sites_custom).find(key => sites_custom[key].domain === sites_custom_new[site].domain && key !== site);
if (customSite_diff)
delete sites_custom[customSite_diff];
sites_custom[site] = sites_custom_new[site];
}
}
sites_custom = filterObject(sites_custom, function (val, key) {
return !(val.add_ext_link && !val.add_ext_link_type)
});
@ -394,6 +401,7 @@ function renderOptions() {
for (let key in sites_custom) {
optionEl = document.createElement('option');
let domain = sites_custom[key]['domain'];
if (domain && domain !== '###')
perm_origins.push(domain);
let isDefaultSite = defaultSites_domains.includes(domain);
optionEl.text = isDefaultSite ? '*' : '';

View file

@ -2351,13 +2351,8 @@ var defaultSites = {
block_regex: /\.washingtonpost\.com\/tetro\/metering\/evaluate/
},
"The Week (regwall)": {
domain: "###_uk_theweek",
group: [
"theweek.co.uk",
"theweek.com"
],
allow_cookies: 1,
useragent: "googlebot"
domain: "theweek.com",
allow_cookies: 1
},
"The West Australian (+ regional/opt-in to custom sites)": {
domain: "thewest.com.au",

View file

@ -105,6 +105,15 @@
"ld_json": "div#paywall-banner|div.arr--story-page-card-wrapper",
"upd_version": "3.3.3.6"
},
"The Week (regwall)": {
"domain": "###_uk_theweek",
"group": [
"theweek.com"
],
"allow_cookies": 1,
"cs_code": "[{\"cond\":\"div.kiosq-main-layer\", \"rm_elem\":1}, {\"cond\":\"div.paywall-locker\", \"rm_class\":\"paywall-locker\"}]",
"upd_version": "3.3.4.1"
},
"The Wrap": {
"domain": "thewrap.com",
"remove_cookies_select_drop": ["blaize_session"],