mirror of https://github.com/gorhill/uBlock.git
Do not use `a` element to access dashboard
Related issue: - https://github.com/uBlockOrigin/uBOL-issues/issues/13
This commit is contained in:
parent
5fa6a12437
commit
4552e2d56a
|
@ -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,
|
||||
|
|
|
@ -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">
|
||||
|
|
Loading…
Reference in New Issue