From b4962b670d02f7c5d4da3cafe99cffffe059e8a1 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 30 Mar 2025 20:21:06 +0300 Subject: stop sending matched content twice for the tooltip, use smaller objects containing only regular expression and rule type --- js/CommonFilters.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/CommonFilters.js b/js/CommonFilters.js index f1f0e9e0c..ce871a2af 100644 --- a/js/CommonFilters.js +++ b/js/CommonFilters.js @@ -20,7 +20,7 @@ const Filters = { PARAM_ACTIONS: [4, 6, 7, 9, 10], filter_info: {}, formatMatchedRules: function(rules) { - return rules.map((r) => r.regexp_matches[0] + ' - ' + r.reg_exp + ' (' + r.type + ')').join('\n'); + return rules.map((r) => r.reg_exp + ' (' + r.type + ')').join('\n'); }, test: function() { const test_dialog = new fox.SingleUseDialog({ @@ -46,7 +46,7 @@ const Filters = { .replace("%f", test_dialog.results) .replace("%d", offset); - results_list.innerHTML += result.items.reduce((current, item) => current + `
  • ${item.title} + results_list.innerHTML += result.items.reduce((current, item) => current + `
  • ${item.title}${item.feed_title}, ${item.date}
    ${item.content_preview}
  • `, ''); -- cgit v1.2.3-54-g00ecf