From 919fe35e367d46f9fc205fc4f6fa923e5d07778d Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Sat, 24 Dec 2022 17:05:55 +0100 Subject: [PATCH] Update custom sites (block_js_inline) --- background.js | 4 ++-- changelog.txt | 1 + custom/sites_custom.json | 27 +++++++++++++++++++++++++++ manifest.json | 2 +- options/options_custom.js | 18 +++++++++++------- sites.js | 6 +++--- 6 files changed, 45 insertions(+), 13 deletions(-) diff --git a/background.js b/background.js index 61182c0a..86e609a9 100644 --- a/background.js +++ b/background.js @@ -332,9 +332,9 @@ function set_rules(sites, sites_updated, sites_custom) { // custom if (rule.googlebot > 0) use_google_bot.push(domain); - if (rule.block_javascript > 0) + if (rule.block_js > 0 || rule.block_javascript > 0) block_js_custom.push(domain); - if (rule.block_javascript_ext > 0) + if (rule.block_js_ext > 0 || rule.block_javascript_ext > 0) block_js_custom_ext.push(domain); if (rule.amp_unhide > 0) amp_unhide.push(domain); diff --git a/changelog.txt b/changelog.txt index 72be0ad5..ad42fb2b 100644 --- a/changelog.txt +++ b/changelog.txt @@ -4,6 +4,7 @@ Changelog Bypass Paywalls Clean - Firefox Post-release Add Wiwo.de Update block general paywall script (Axate.io) +Update custom sites (block_js_inline) Update custom sites (cs_code: remove/unhide in dom) * v2.9.8.0 (2022-12-18) diff --git a/custom/sites_custom.json b/custom/sites_custom.json index 9be1339a..03f0054b 100644 --- a/custom/sites_custom.json +++ b/custom/sites_custom.json @@ -58,6 +58,13 @@ "domain": "diabeteshealth.co.in", "ld_json": "div#paywall-banner|div[class^='text-story-m_gap']" }, + "Diariodenavarra.es": { + "allow_cookies": 1, + "amp_redirect": "div#paywallMessage", + "amp_unhide": 1, + "cs_code": "[{\"cond\":\"section.txt\",\"rm_elem\":1}]", + "domain": "diariodenavarra.es" + }, "Die-glocke.de": { "allow_cookies": 1, "domain": "die-glocke.de", @@ -78,6 +85,11 @@ "domain": "euromoney.com", "useragent": "googlebot" }, + "Finanz-szene.de": { + "allow_cookies": 1, + "domain": "finanz-szene.de", + "useragent": "googlebot" + }, "Fnweb.de": { "allow_cookies": 1, "domain": "fnweb.de", @@ -109,6 +121,11 @@ "domain": "heidi.news", "useragent": "googlebot" }, + "Heraldo.es": { + "allow_cookies": 1, + "block_js_inline": "\\.heraldo\\.es\\/noticias", + "domain": "heraldo.es" + }, "Heraldscotland.com": { "allow_cookies": 1, "block_regex": "\\.tinypass\\.com", @@ -184,6 +201,11 @@ "Medpagetoday.com": { "domain": "medpagetoday.com" }, + "Milesplit.com": { + "allow_cookies": 1, + "domain": "milesplit.com", + "useragent": "facebookbot" + }, "Nationalobserver.com": { "allow_cookies": 1, "block_regex": "\\.tinypass\\.com", @@ -323,6 +345,11 @@ "block_regex": "\\.tinypass\\.com", "domain": "toledoblade.com" }, + "Toolkits.com": { + "allow_cookies": 1, + "block_regex": "\\.toolkits\\.com\\/app\\/js\\/api\\.min\\.js", + "domain": "toolkits.com" + }, "Vigilantcitizen.com": { "allow_cookies": 1, "domain": "vigilantcitizen.com", diff --git a/manifest.json b/manifest.json index 98ec224b..b13022e5 100644 --- a/manifest.json +++ b/manifest.json @@ -716,5 +716,5 @@ "*://*.wallkit.net/*", "*://webcache.googleusercontent.com/*" ], - "version": "2.9.8.4" + "version": "2.9.8.5" } diff --git a/options/options_custom.js b/options/options_custom.js index e6660dbc..9bc04ea8 100644 --- a/options/options_custom.js +++ b/options/options_custom.js @@ -209,8 +209,9 @@ function edit_options() { document.querySelector('input[data-key="domain"]').value = edit_site.domain; document.querySelector('select[data-key="useragent"]').selectedIndex = (edit_site.googlebot > 0) ? 1 : useragent_options.indexOf(edit_site.useragent); document.querySelector('input[data-key="allow_cookies"]').checked = (edit_site.allow_cookies > 0); - document.querySelector('input[data-key="block_javascript"]').checked = (edit_site.block_javascript > 0); - document.querySelector('input[data-key="block_javascript_ext"]').checked = (edit_site.block_javascript_ext > 0); + document.querySelector('input[data-key="block_js"]').checked = (edit_site.block_js > 0 || edit_site.block_javascript > 0); + document.querySelector('input[data-key="block_js_ext"]').checked = (edit_site.block_js_ext > 0 || edit_site.block_javascript_ext > 0); + document.querySelector('input[data-key="block_js_inline"]').value = edit_site.block_js_inline ? edit_site.block_js_inline : ''; document.querySelector('input[data-key="block_regex"]').value = edit_site.block_regex ? edit_site.block_regex : ''; document.querySelector('textarea[data-key="cs_code"]').value = edit_site.cs_code ? edit_site.cs_code : ''; document.querySelector('input[data-key="amp_unhide"]').checked = (edit_site.amp_unhide > 0); @@ -276,8 +277,9 @@ function renderOptions() { 'title': 0, 'domain': 0, 'allow_cookies': 1, - 'block_javascript (domain)': 1, - 'block_javascript_ext': 1, + 'block_js (domain)': 1, + 'block_js_ext': 1, + 'block_js_inline': 0, 'block_regex': 0, 'amp_unhide': 1, 'amp_redirect': 0, @@ -304,6 +306,7 @@ function renderOptions() { let placeholders = { title: 'Example', domain: 'example.com', + block_js_inline: '\\.example\\.com\\/article\\/', block_regex: '\\.example\\.com\\/js\\/', amp_redirect: 'div.paywall', ld_json: 'div.paywall|div.article', @@ -356,9 +359,10 @@ function renderOptions() { optionEl.text += key + ': ' + domain + (sites_custom[key]['googlebot'] > 0 ? ' | googlebot' : '') + (sites_custom[key]['allow_cookies'] > 0 ? ' | allow_cookies' : '') + - (sites_custom[key]['block_javascript'] > 0 ? ' | block javascript' : '') + - (sites_custom[key]['block_javascript_ext'] > 0 ? ' | block javascript ext' : '') + - (sites_custom[key]['block_regex'] ? ' | block regex' : '') + + ((sites_custom[key]['block_js'] > 0 || sites_custom[key]['block_javascript'] > 0) ? ' | block_js' : '') + + ((sites_custom[key]['block_js_ext'] > 0 || sites_custom[key]['block_javascript_ext'] > 0) ? ' | block_js_ext' : '') + + (sites_custom[key]['block_js_inline'] ? ' | block_js_inline' : '') + + (sites_custom[key]['block_regex'] ? ' | block_regex' : '') + (sites_custom[key]['useragent'] ? ' | useragent: ' + sites_custom[key]['useragent'] : '') + (sites_custom[key]['referer'] ? ' | referer: ' + sites_custom[key]['referer'] : '') + (sites_custom[key]['random_ip'] ? ' | random_ip: ' + sites_custom[key]['random_ip'] : '') + diff --git a/sites.js b/sites.js index 640a27cc..aab26420 100644 --- a/sites.js +++ b/sites.js @@ -283,7 +283,7 @@ var defaultSites = { allow_cookies: 1, block_regex: /\.clarin\.com\/.+\/auth\d\.js/ }, - "CNBC (only news)": { + "CNBC (news only)": { domain: "cnbc.com", allow_cookies: 1, block_regex: /\.tinypass\.com\// @@ -1059,7 +1059,7 @@ var defaultSites = { "La Tercera": { domain: "latercera.com", allow_cookies: 1, - block_regex: /(\.latercera\.com\/arc\/subs\/p\.min\.js|cdn\.cxense\.com\/)/ + block_regex: /(\.latercera\.com\/arc\/subs\/p\.min\.js|cdn\.cxense\.com\/|\.tinypass\.com\/)/ }, "La Tribune": { domain: "latribune.fr", @@ -1809,7 +1809,7 @@ var defaultSites = { domain: "thedailybeast.com", block_regex: /\.tinypass\.com\// }, - "The Daily Wire (only news)": { + "The Daily Wire (news only)": { domain: "dailywire.com", allow_cookies: 1 },