From 869c10940c4bccf9698e68173b34db749d5b92c8 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Wed, 10 Apr 2024 08:57:01 +0200 Subject: [PATCH] Update custom sites (block_regex_ignore_default) --- background.js | 2 +- changelog.txt | 1 + options/options_custom.js | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/background.js b/background.js index c23a524..e97adc8 100644 --- a/background.js +++ b/background.js @@ -429,7 +429,7 @@ function set_rules(sites, sites_updated, sites_custom) { rule = {}; for (let key in sites_custom[customSite_title]) rule[key] = sites_custom[customSite_title][key]; - if (block_regex_default) { + if (block_regex_default && !rule.block_regex_ignore_default) { if (rule.hasOwnProperty('block_regex')) { if (block_regex_default instanceof RegExp) block_regex_default = block_regex_default.source; diff --git a/changelog.txt b/changelog.txt index 6ac098b..b4d5d45 100644 --- a/changelog.txt +++ b/changelog.txt @@ -5,6 +5,7 @@ Updates (install signed xpi-file): https://gitlab.com/magnolia1234/bypass-paywal Post-release Add OVB Media (opt-in to custom sites for unlisted) Add Private Media AU +Update custom sites (block_regex_ignore_default) * v3.6.3.0 (2024-04-07) Add Bild.de (fetch from archive.is) diff --git a/options/options_custom.js b/options/options_custom.js index 722bf4c..eb5d63a 100644 --- a/options/options_custom.js +++ b/options/options_custom.js @@ -281,6 +281,7 @@ function edit_options() { 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 || ''; document.querySelector('input[data-key="block_regex"]').value = edit_site.block_regex || ''; + document.querySelector('input[data-key="block_regex_ignore_default"]').checked = (edit_site.block_regex_ignore_default > 0 || edit_site.block_regex_ignore_default > 0); document.querySelector('input[data-key="block_host_perm_add"]').value = edit_site.block_host_perm_add || ''; document.querySelector('input[data-key="amp_unhide"]').checked = (edit_site.amp_unhide > 0); document.querySelector('input[data-key="amp_redirect"]').value = edit_site.amp_redirect || ''; @@ -364,7 +365,8 @@ function renderOptions() { 'block_js (domain)': 1, 'block_js_ext': 1, 'block_js_inline': 0, - 'block_regex': 0, + 'block_regex (add to default)': 0, + 'block_regex_ignore_default': 1, 'block_host_perm_add': 0, 'amp_unhide': 1, 'amp_redirect': 0,