From 09543f5b2ad9c4178b68b3986d4df6f9ab071127 Mon Sep 17 00:00:00 2001 From: hensm Date: Tue, 14 Jan 2020 03:02:10 +0000 Subject: [PATCH] Always show "Cast..." menu item --- ext/src/background/background.ts | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/ext/src/background/background.ts b/ext/src/background/background.ts index c093d90..85fff75 100755 --- a/ext/src/background/background.ts +++ b/ext/src/background/background.ts @@ -91,8 +91,8 @@ async function initMenus () { type MenuId = string | number; + let menuIdCast: MenuId; let menuIdMediaCast: MenuId; - let menuIdMirroringCast: MenuId; let menuIdWhitelist: MenuId; let menuIdWhitelistRecommended: MenuId; @@ -101,6 +101,12 @@ async function initMenus () { const opts = await options.getAll(); + // Global "Cast..." menu item + menuIdCast = await browser.menus.create({ + contexts: [ "browser_action", "page", "tools_menu" ] + , title: _("contextCast") + }); + //