"use strict"; import options from "./lib/options"; import { TypedEventTarget } from "./lib/typedEvents"; const _ = browser.i18n.getMessage; const URL_PATTERN_HTTP = "http://*/*"; const URL_PATTERN_HTTPS = "https://*/*"; const URL_PATTERN_FILE = "file://*/*"; const URL_PATTERNS_REMOTE = [ URL_PATTERN_HTTP, URL_PATTERN_HTTPS ]; const URL_PATTERNS_ALL = [ ...URL_PATTERNS_REMOTE, URL_PATTERN_FILE ]; type MenuId = string | number; let menuIdMediaCast: MenuId; let menuIdMirroringCast: MenuId; let menuIdWhitelist: MenuId; let menuIdWhitelistRecommended: MenuId; const whitelistChildMenuPatterns = new Map(); let hasCreatedMenus = false; export default async function createMenus () { if (!hasCreatedMenus) { hasCreatedMenus = true; const opts = await options.getAll(); //