diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2025-03-30 20:41:50 +0300 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2025-03-30 20:41:50 +0300 |
| commit | 2d041f7d28ce555bffaf1b99eea5d0199e8a3c29 (patch) | |
| tree | b42ba59bb76ecf7ed57e568a55052d9ef206ab43 /js | |
| parent | b4962b670d02f7c5d4da3cafe99cffffe059e8a1 (diff) | |
use server-side localized formatting for matching rule to display as a tooltip (for now)
Diffstat (limited to 'js')
| -rw-r--r-- | js/CommonFilters.js | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/js/CommonFilters.js b/js/CommonFilters.js index ce871a2af..9c0fc5cce 100644 --- a/js/CommonFilters.js +++ b/js/CommonFilters.js @@ -19,9 +19,6 @@ const Filters = { ACTION_REMOVE_TAG: 10, PARAM_ACTIONS: [4, 6, 7, 9, 10], filter_info: {}, - formatMatchedRules: function(rules) { - return rules.map((r) => r.reg_exp + ' (' + r.type + ')').join('\n'); - }, test: function() { const test_dialog = new fox.SingleUseDialog({ title: "Test Filter", @@ -46,7 +43,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.rules))}"><span class='title'>${item.title}</span> + results_list.innerHTML += result.items.reduce((current, item) => current + `<li title="${App.escapeHtml(item.rules.join('\n'))}"><span class='title'>${item.title}</span> — <span class='feed'>${item.feed_title}</span>, <span class='date'>${item.date}</span> <div class='preview text-muted'>${item.content_preview}</div></li>`, ''); |