Skip to content

Commit

Permalink
Support keyboard shortcut to open popup panel
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed Nov 9, 2019
1 parent 7bf5ac0 commit e2fdc1b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions platform/firefox/manifest.json
Expand Up @@ -19,6 +19,8 @@
}
},
"commands": {
"_execute_browser_action": {
},
"launch-element-zapper": {
"description": "__MSG_popupTipZapper__"
},
Expand Down
7 changes: 6 additions & 1 deletion src/js/shortcuts.js
Expand Up @@ -204,7 +204,12 @@
const template = document.querySelector('#templates .commandEntry');
const tbody = document.querySelector('.commandEntries tbody');
for ( const command of commands ) {
if ( command.description === '' ) { continue; }
if (
typeof command.description !== 'string' ||
command.description === '' )
{
continue;
}
const tr = template.cloneNode(true);
tr.setAttribute('data-name', command.name);
tr.querySelector('.commandDesc').textContent = command.description;
Expand Down

0 comments on commit e2fdc1b

Please sign in to comment.