Skip to content

Commit e2fdc1b

Browse files
committed
Support keyboard shortcut to open popup panel
Related discussion: - https://www.reddit.com/r/uBlockOrigin/comments/dt47s0/
1 parent 7bf5ac0 commit e2fdc1b

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

platform/firefox/manifest.json

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
}
2020
},
2121
"commands": {
22+
"_execute_browser_action": {
23+
},
2224
"launch-element-zapper": {
2325
"description": "__MSG_popupTipZapper__"
2426
},

src/js/shortcuts.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,12 @@
204204
const template = document.querySelector('#templates .commandEntry');
205205
const tbody = document.querySelector('.commandEntries tbody');
206206
for ( const command of commands ) {
207-
if ( command.description === '' ) { continue; }
207+
if (
208+
typeof command.description !== 'string' ||
209+
command.description === '' )
210+
{
211+
continue;
212+
}
208213
const tr = template.cloneNode(true);
209214
tr.setAttribute('data-name', command.name);
210215
tr.querySelector('.commandDesc').textContent = command.description;

0 commit comments

Comments
 (0)