mirror of
https://github.com/mdn/webextensions-examples.git
synced 2026-04-17 23:08:33 +02:00
Merge pull request #493 from sayanarijit/patch-1
Minor fix in commands extension
This commit is contained in:
@@ -5,7 +5,7 @@ const commandName = 'toggle-feature';
|
|||||||
*/
|
*/
|
||||||
async function updateUI() {
|
async function updateUI() {
|
||||||
let commands = await browser.commands.getAll();
|
let commands = await browser.commands.getAll();
|
||||||
for (command of commands) {
|
for (let command of commands) {
|
||||||
if (command.name === commandName) {
|
if (command.name === commandName) {
|
||||||
document.querySelector('#shortcut').value = command.shortcut;
|
document.querySelector('#shortcut').value = command.shortcut;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user