Skip to content

Commit

Permalink
feat: add shortcut to toggle plugin on and off
Browse files Browse the repository at this point in the history
  • Loading branch information
Pyxels authored and notartom committed Jan 17, 2023
1 parent 9472ae9 commit 7952fca
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions background.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ var getting = browser.storage.local.get(["zoomFactor", "zoomThreshold"]);
getting.then(updateConstsFromSync);

browser.browserAction.onClicked.addListener(toggle);
browser.commands.onCommand.addListener((command) => {
if (command === "toggle-reszoom") {
toggle();
}
});
browser.tabs.onActivated.addListener(activated);
browser.tabs.onUpdated.addListener(updated);
browser.runtime.onMessage.addListener(resized);
8 changes: 8 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,13 @@
],
"options_ui": {
"page": "options.html"
},
"commands": {
"toggle-reszoom": {
"suggested_key": {
"linux": "Ctrl+Alt+Z"
},
"description": "Toggle On/Off"
}
}
}

0 comments on commit 7952fca

Please sign in to comment.