Skip to content

Instantly share code, notes, and snippets.

@ayoisaiah
Created May 31, 2025 06:35
Show Gist options
  • Save ayoisaiah/5917a678c6bb7a251bbbecc54884e766 to your computer and use it in GitHub Desktop.
Save ayoisaiah/5917a678c6bb7a251bbbecc54884e766 to your computer and use it in GitHub Desktop.
B
chrome.contextMenus.onClicked.addListener(async (info) => {
if (info.menuItemId === "createCalendarEvent") {
const selectedText = info.selectionText;
try {
console.log(selectedText);
} catch (e) {
console.log(e);
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment