fix the bug that firefox android cant start

This commit is contained in:
proxy.zeroomega 2024-09-16 01:58:01 +08:00
parent 0b893c8a00
commit bc69662911
3 changed files with 4 additions and 3 deletions

View File

@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "Proxy SwitchyOmega 3 (ZeroOmega)",
"version": "3.3.12",
"version": "3.3.13",
"description": "__MSG_manifest_app_description__",
"icons": {
"16": "img/icons/omega-action-16.png",

View File

@ -16,7 +16,7 @@ chrome.runtime.onStartup.addListener ->
chrome.contextMenus.onClicked.addListener((info, tab) ->
chrome.contextMenus?.onClicked.addListener((info, tab) ->
options?.ready.then( ->
switch info.menuItemId
when 'inspectPage', 'inspectLink', 'inspectElement', 'inspectFrame'

View File

@ -6,6 +6,7 @@ globalThis.zeroDetectModeCB = null
globalThis.startupCheck = undefined
initContextMenu = ->
return unless chrome.contextMenus
chrome.contextMenus.removeAll()
chrome.contextMenus.create({
id: 'enableQuickSwitch'
@ -23,7 +24,7 @@ initContextMenu = ->
initContextMenu()
chrome.contextMenus.onClicked.addListener((info, tab) ->
chrome.contextMenus?.onClicked.addListener((info, tab) ->
switch info.menuItemId
when 'reportIssue'
OmegaDebug.reportIssue()