handleContextMenuClick function exported
Last updated: 2026-03-01T23:25:47.058Z
Location
Metrics
LOC: 41
Complexity: 6
Params: 3
Signature
handleContextMenuClick(
info: chrome.contextMenus.OnClickData,
tab?: chrome.tabs.Tab,
): : void
Source Code
export function handleContextMenuClick(
info: chrome.contextMenus.OnClickData,
tab?: chrome.tabs.Tab,
): void {
if (!tab?.id) return;
switch (info.menuItemId) {
case "fill-all-fields":
void sendToSpecificTab(
tab.id,
tab.url,
{ type: "FILL_ALL_FIELDS" },
{ injectIfNeeded: true },
);
break;
case "fill-all-save-form":
void sendToSpecificTab(
tab.id,
tab.url,
{ type: "SAVE_FORM" },
{ injectIfNeeded: true },
);
break;
case "fill-all-field-rule":
void sendToSpecificTab(
tab.id,
tab.url,
{ type: "FILL_SINGLE_FIELD" },
{ injectIfNeeded: true },
);
break;
case "fill-all-export-e2e":
void sendToSpecificTab(
tab.id,
tab.url,
{ type: "EXPORT_E2E", payload: { framework: "playwright" } },
{ injectIfNeeded: true },
);
break;
}
}
No outgoing dependencies.
Impact (Incoming)
| Source | Type |
|---|---|
| handleMessage | uses |