import { REPORT_MENU_ITEM_ID, SETTINGS_MENU_ITEM_ID } from '~utils/constants'; import { suppressLastError } from '~utils/error'; export default function onClicked(data: chrome.contextMenus.OnClickData) { switch (data.menuItemId) { case REPORT_MENU_ITEM_ID: chrome.action.openPopup(suppressLastError); break; case SETTINGS_MENU_ITEM_ID: chrome.runtime.openOptionsPage(suppressLastError); break; default: break; } }