Fix and fine tune "Report a filter issue" page

Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/2619
This commit is contained in:
Raymond Hill 2023-04-28 08:38:26 -04:00
parent ca2b016ee9
commit 6d81614bd8
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
3 changed files with 16 additions and 7 deletions

View File

@ -86,6 +86,10 @@ span[data-url] {
cursor: pointer;
}
#showSupportInfo {
cursor: pointer;
}
body.redacted #redactButton {
display: none;
}

View File

@ -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', ( ) => {

View File

@ -101,7 +101,7 @@
<button type="button" data-i18n="supportReportSpecificButton" class="preferred">_<span class="hover"></span></button>
</div>
<hr>
<h3 id="showSupportInfo" class="subtil" data-i18n="supportS5H">_</h3>
<h3 id="showSupportInfo" class="subtil" data-i18n="supportS5H">_<span>&nbsp;&#x25b8;</span></h3>
</div>
<div class="a b c d">
<h3 data-i18n="supportS5H"></h3>