Skip to content

Commit

Permalink
Fix action
Browse files Browse the repository at this point in the history
  • Loading branch information
Methuselah96 committed Aug 10, 2024
1 parent 7bbee9d commit 32ef89d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion extension/src/background/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ chrome.commands.onCommand.addListener((shortcut) => {
openDevToolsWindow(shortcut as DevToolsPosition);
});

// Create the context menu when installed
// Disable the action by default and create the context menu when installed
chrome.runtime.onInstalled.addListener(() => {
chrome.action.disable();

syncOptions().get((option) => {
if (option.showContextMenus) createMenu();
});
Expand Down
4 changes: 2 additions & 2 deletions extension/src/background/store/apiMiddleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -605,8 +605,8 @@ function onConnect<S, A extends Action<string>>(port: chrome.runtime.Port) {
if (msg === 'heartbeat') return;
if (msg.name === 'INIT_INSTANCE') {
if (typeof id === 'number') {
chrome.pageAction.show(id);
chrome.pageAction.setIcon({ tabId: id, path: 'img/logo/38x38.png' });
chrome.action.enable(id);
chrome.action.setIcon({ tabId: id, path: 'img/logo/38x38.png' });
}
if (isMonitored) port.postMessage({ type: 'START' });

Expand Down

0 comments on commit 32ef89d

Please sign in to comment.