This commit is contained in:
Nathan Bierema 2025-01-09 09:36:30 -05:00
parent 18fd9783cb
commit d113852f89
2 changed files with 3 additions and 3 deletions

View File

@ -22,8 +22,8 @@ export function createMenu() {
});
}
export function removeMenu() {
chrome.contextMenus.removeAll();
export async function removeMenu() {
await chrome.contextMenus.removeAll();
}
chrome.contextMenus.onClicked.addListener(({ menuItemId }) => {

View File

@ -26,7 +26,7 @@ chrome.runtime.onInstalled.addListener(() => {
chrome.storage.onChanged.addListener((changes) => {
if (changes.showContextMenus) {
if (changes.showContextMenus.newValue) createMenu();
else removeMenu();
else void removeMenu();
}
});