1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-06 19:02:30 +01:00

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; cursor: pointer;
} }
#showSupportInfo {
cursor: pointer;
}
body.redacted #redactButton { body.redacted #redactButton {
display: none; display: none;
} }

View File

@ -282,7 +282,7 @@ uBlockDashboard.patchCodeMirrorEditor(cmEditor);
if ( reportedPage !== null ) { if ( reportedPage !== null ) {
if ( dom.cl.has(dom.body, 'shouldUpdate') ) { if ( dom.cl.has(dom.body, 'shouldUpdate') ) {
dom.on('.shouldUpdate button', 'click', ev => { dom.on('.supportEntry.shouldUpdate button', 'click', ev => {
updateFilterLists(); updateFilterLists();
ev.preventDefault(); ev.preventDefault();
}); });
@ -304,7 +304,7 @@ uBlockDashboard.patchCodeMirrorEditor(cmEditor);
}); });
dom.on('#showSupportInfo', 'click', ev => { dom.on('#showSupportInfo', 'click', ev => {
const button = ev.target; const button = ev.target.closest('#showSupportInfo');
dom.cl.add(button, 'hidden'); dom.cl.add(button, 'hidden');
dom.cl.add('.a.b.c.d', 'e'); dom.cl.add('.a.b.c.d', 'e');
cmEditor.refresh(); cmEditor.refresh();
@ -312,10 +312,15 @@ uBlockDashboard.patchCodeMirrorEditor(cmEditor);
} }
vAPI.broadcastListener.add(msg => { vAPI.broadcastListener.add(msg => {
if ( msg.what !== 'staticFilteringDataChanged' ) { return; } if ( msg.what === 'assetsUpdated' ) {
showSupportData();
dom.cl.remove(dom.body, 'updating'); dom.cl.remove(dom.body, 'updating');
dom.cl.add(dom.body, 'updated'); dom.cl.add(dom.body, 'updated');
return;
}
if ( msg.what === 'staticFilteringDataChanged' ) {
showSupportData();
return;
}
}); });
dom.on('#selectAllButton', 'click', ( ) => { dom.on('#selectAllButton', 'click', ( ) => {

View File

@ -101,7 +101,7 @@
<button type="button" data-i18n="supportReportSpecificButton" class="preferred">_<span class="hover"></span></button> <button type="button" data-i18n="supportReportSpecificButton" class="preferred">_<span class="hover"></span></button>
</div> </div>
<hr> <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>
<div class="a b c d"> <div class="a b c d">
<h3 data-i18n="supportS5H"></h3> <h3 data-i18n="supportS5H"></h3>