1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-20 01:12:38 +01:00

Do not use a element to access dashboard

Related issue:
- https://github.com/uBlockOrigin/uBOL-issues/issues/13
This commit is contained in:
Raymond Hill 2022-12-16 12:05:59 -05:00
parent 5fa6a12437
commit 4552e2d56a
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
2 changed files with 10 additions and 2 deletions

View File

@ -25,7 +25,7 @@
/******************************************************************************/
import { browser, sendMessage } from './ext.js';
import { browser, runtime, sendMessage } from './ext.js';
import { dom, qs$ } from './dom.js';
import { i18n$ } from './i18n.js';
import { simpleStorage } from './storage.js';
@ -259,6 +259,14 @@ dom.on('#lessButton', 'click', ( ) => {
/******************************************************************************/
dom.on('[data-i18n-title="popupTipDashboard"]', 'click', ev => {
if ( ev.isTrusted !== true ) { return; }
if ( ev.button !== 0 ) { return; }
runtime.openOptionsPage();
});
/******************************************************************************/
async function init() {
const [ tab ] = await browser.tabs.query({
active: true,

View File

@ -30,7 +30,7 @@
<span></span>
<span></span>
<span></span>
<a href="dashboard.html" class="fa-icon tool enabled" target="uBODashboard" tabindex="0" data-i18n-title="popupTipDashboard">cogs<span class="caption" data-i18n="popupTipDashboard"></span></a>
<span class="fa-icon tool enabled" tabindex="0" data-i18n-title="popupTipDashboard">cogs<span class="caption" data-i18n="popupTipDashboard"></span></span>
</div>
<!-- -------- -->
<div id="rulesetStats" data-section="a">