summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@fakecake.org>2025-03-30 20:21:06 +0300
committerAndrew Dolgov <fox@fakecake.org>2025-03-30 20:21:06 +0300
commitb4962b670d02f7c5d4da3cafe99cffffe059e8a1 (patch)
treeb1f8a8f87632e671e9f9034721841fef9cacef44 /js
parent10c488e1d05734e4e939db71a3ab9448c6e2ad11 (diff)
stop sending matched content twice for the tooltip, use smaller objects containing only regular expression and rule type
Diffstat (limited to 'js')
-rw-r--r--js/CommonFilters.js4
1 files changed, 2 insertions, 2 deletions
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 + `<li title="${App.escapeHtml(dialog.formatMatchedRules(item.matched_rules))}"><span class='title'>${item.title}</span>
+ results_list.innerHTML += result.items.reduce((current, item) => current + `<li title="${App.escapeHtml(dialog.formatMatchedRules(item.rules))}"><span class='title'>${item.title}</span>
&mdash; <span class='feed'>${item.feed_title}</span>, <span class='date'>${item.date}</span>
<div class='preview text-muted'>${item.content_preview}</div></li>`, '');