Skip to content

Commit

Permalink
- feature: open popup from default action (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
agallardol authored Oct 13, 2023
1 parent 76aa023 commit ee97578
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions apps/shinkai-visor/src/service-worker/action.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { ContentScriptMessageType } from "./communication/content-script-message-type";
import { sendContentScriptMessage } from "./communication/content-script-messages";

chrome.action.onClicked.addListener((tab) => {
if (!tab?.id) {
return;
}
sendContentScriptMessage({ type: ContentScriptMessageType.TogglePopupVisibility }, tab?.id);
});
1 change: 1 addition & 0 deletions apps/shinkai-visor/src/service-worker/service-worker.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import './context-menu';
import './communication/message';
import './shortcuts';
import './action';

0 comments on commit ee97578

Please sign in to comment.