Skip to content

Commit c47c37b

Browse files
committed
Implement manifest commands (shortcuts)
Related to #24.
1 parent 5eeb17a commit c47c37b

File tree

1 file changed

+7
-0
lines changed
  • src/browser/extension/background

1 file changed

+7
-0
lines changed

src/browser/extension/background/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import createDevStore from '../../../app/store/createDevStore.js';
2+
import openDevToolsWindow from './openWindow';
23
import createMenu from './contextMenus';
34
import { toContentScript } from './messaging';
45

@@ -9,3 +10,9 @@ const store = createDevStore((action) => {
910
createMenu();
1011

1112
window.store = store;
13+
14+
chrome.commands.onCommand.addListener(shortcut => {
15+
if (store.liftedStore.isSet()) {
16+
openDevToolsWindow(shortcut);
17+
}
18+
});

0 commit comments

Comments
 (0)