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"],
|
contexts: ["browser_action"],
|
||||||
})
|
})
|
||||||
|
|
||||||
browser.contextMenus.create({
|
try {
|
||||||
id: "toggleTab",
|
browser.contextMenus.create({
|
||||||
title: browser.i18n.getMessage("toggleTab"),
|
id: "toggleTab",
|
||||||
contexts: ["page", "tab"],
|
title: browser.i18n.getMessage("toggleTab"),
|
||||||
})
|
contexts: ["page", "tab"],
|
||||||
|
})
|
||||||
|
} catch {
|
||||||
|
browser.contextMenus.create({
|
||||||
|
id: "toggleTab",
|
||||||
|
title: browser.i18n.getMessage("toggleTab"),
|
||||||
|
contexts: ["page"],
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
browser.contextMenus.create({
|
browser.contextMenus.create({
|
||||||
id: "redirectLink",
|
id: "redirectLink",
|
||||||
|
|
Loading…
Reference in New Issue