Fixed bug on chromium browsers where creating toggle redirects context menu would fail
This commit is contained in:
parent
4709a6667d
commit
11b42fb9dc
|
@ -164,11 +164,19 @@ browser.contextMenus.create({
|
|||
contexts: ["browser_action"],
|
||||
})
|
||||
|
||||
browser.contextMenus.create({
|
||||
id: "toggleTab",
|
||||
title: browser.i18n.getMessage("toggleTab"),
|
||||
contexts: ["page", "tab"],
|
||||
})
|
||||
try {
|
||||
browser.contextMenus.create({
|
||||
id: "toggleTab",
|
||||
title: browser.i18n.getMessage("toggleTab"),
|
||||
contexts: ["page", "tab"],
|
||||
})
|
||||
} catch {
|
||||
browser.contextMenus.create({
|
||||
id: "toggleTab",
|
||||
title: browser.i18n.getMessage("toggleTab"),
|
||||
contexts: ["page"],
|
||||
})
|
||||
}
|
||||
|
||||
browser.contextMenus.create({
|
||||
id: "redirectLink",
|
||||
|
|
Loading…
Reference in New Issue