fix: remove browser contextMenus (issue #262)
This commit is contained in:
@@ -45,9 +45,9 @@ const REMOVE_HEADERS = [
|
|||||||
async function addContextMenus(contextMenuType = 1) {
|
async function addContextMenus(contextMenuType = 1) {
|
||||||
// 添加前先删除,避免重复ID的错误
|
// 添加前先删除,避免重复ID的错误
|
||||||
try {
|
try {
|
||||||
await browser.menus.removeAll();
|
await browser.contextMenus.removeAll();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
//
|
kissLog(err, "remove contextMenus");
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (contextMenuType) {
|
switch (contextMenuType) {
|
||||||
|
|||||||
Reference in New Issue
Block a user