From 8f2aed18fe90ab8fdea23370f972d2881f00b432 Mon Sep 17 00:00:00 2001 From: Gabe Yuan Date: Wed, 3 Jan 2024 10:32:11 +0800 Subject: [PATCH] fix: contextMenus created on page and selection --- src/background.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/background.js b/src/background.js index 5182682..8e3a0c4 100644 --- a/src/background.js +++ b/src/background.js @@ -31,27 +31,27 @@ function addContextMenus() { browser.contextMenus.create({ id: CMD_TOGGLE_TRANSLATE, title: browser.i18n.getMessage("toggle_translate"), - contexts: ["all"], + contexts: ["page", "selection"], }); browser.contextMenus.create({ id: CMD_TOGGLE_STYLE, title: browser.i18n.getMessage("toggle_style"), - contexts: ["all"], + contexts: ["page", "selection"], }); browser.contextMenus.create({ id: CMD_OPEN_TRANBOX, title: browser.i18n.getMessage("open_tranbox"), - contexts: ["all"], + contexts: ["page", "selection"], }); browser.contextMenus.create({ id: "options_separator", type: "separator", - contexts: ["all"], + contexts: ["page", "selection"], }); browser.contextMenus.create({ id: CMD_OPEN_OPTIONS, title: browser.i18n.getMessage("open_options"), - contexts: ["all"], + contexts: ["page", "selection"], }); }