From 6d81614bd85037b87aced32a566da6d6a28d27e4 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Fri, 28 Apr 2023 08:38:26 -0400 Subject: [PATCH] Fix and fine tune "Report a filter issue" page Related feedback: - https://github.com/uBlockOrigin/uBlock-issues/discussions/2619 --- src/css/support.css | 4 ++++ src/js/support.js | 17 +++++++++++------ src/support.html | 2 +- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/css/support.css b/src/css/support.css index 30e92dddf..e804e3f71 100644 --- a/src/css/support.css +++ b/src/css/support.css @@ -86,6 +86,10 @@ span[data-url] { cursor: pointer; } +#showSupportInfo { + cursor: pointer; + } + body.redacted #redactButton { display: none; } diff --git a/src/js/support.js b/src/js/support.js index 17a2f09d3..dc39ae851 100644 --- a/src/js/support.js +++ b/src/js/support.js @@ -282,7 +282,7 @@ uBlockDashboard.patchCodeMirrorEditor(cmEditor); if ( reportedPage !== null ) { if ( dom.cl.has(dom.body, 'shouldUpdate') ) { - dom.on('.shouldUpdate button', 'click', ev => { + dom.on('.supportEntry.shouldUpdate button', 'click', ev => { updateFilterLists(); ev.preventDefault(); }); @@ -304,7 +304,7 @@ uBlockDashboard.patchCodeMirrorEditor(cmEditor); }); dom.on('#showSupportInfo', 'click', ev => { - const button = ev.target; + const button = ev.target.closest('#showSupportInfo'); dom.cl.add(button, 'hidden'); dom.cl.add('.a.b.c.d', 'e'); cmEditor.refresh(); @@ -312,10 +312,15 @@ uBlockDashboard.patchCodeMirrorEditor(cmEditor); } vAPI.broadcastListener.add(msg => { - if ( msg.what !== 'staticFilteringDataChanged' ) { return; } - showSupportData(); - dom.cl.remove(dom.body, 'updating'); - dom.cl.add(dom.body, 'updated'); + if ( msg.what === 'assetsUpdated' ) { + dom.cl.remove(dom.body, 'updating'); + dom.cl.add(dom.body, 'updated'); + return; + } + if ( msg.what === 'staticFilteringDataChanged' ) { + showSupportData(); + return; + } }); dom.on('#selectAllButton', 'click', ( ) => { diff --git a/src/support.html b/src/support.html index fc7a3e70f..206e20a51 100644 --- a/src/support.html +++ b/src/support.html @@ -101,7 +101,7 @@
-

_

+

_ ▸