fix firefox startupProfileName doesn't work problem.

This commit is contained in:
suziwen 2024-08-14 08:37:42 +08:00
parent 748710a659
commit 0be8c2733e

View File

@ -1,19 +1,21 @@
zeroBackground = (zeroStorage, opts) -> OmegaTargetCurrent = Object.create(OmegaTargetChromium)
OmegaTargetCurrent = Object.create(OmegaTargetChromium) Promise = OmegaTargetCurrent.Promise
Promise = OmegaTargetCurrent.Promise Promise.longStackTraces()
Promise.longStackTraces()
OmegaTargetCurrent.Log = Object.create(OmegaTargetCurrent.Log) OmegaTargetCurrent.Log = Object.create(OmegaTargetCurrent.Log)
Log = OmegaTargetCurrent.Log Log = OmegaTargetCurrent.Log
# TODO (suziwen1@gmail.com) # TODO (suziwen1@gmail.com)
globalThis.isBrowserRestart = globalThis.startupCheck is undefined globalThis.isBrowserRestart = globalThis.startupCheck is undefined
startupCheck = globalThis.startupCheck ?= -> true startupCheck = globalThis.startupCheck ?= -> true
chrome.runtime.onStartup.addListener -> chrome.runtime.onStartup.addListener ->
globalThis.isBrowserRestart = true globalThis.isBrowserRestart = true
dispName = (name) -> chrome.i18n.getMessage('profile_' + name) || name
zeroBackground = (zeroStorage, opts) ->
unhandledPromises = [] unhandledPromises = []
unhandledPromisesId = [] unhandledPromisesId = []
unhandledPromisesNextId = 1 unhandledPromisesNextId = 1
@ -69,7 +71,6 @@ zeroBackground = (zeroStorage, opts) ->
isHidden = (name) -> (name.charCodeAt(0) == charCodeUnderscore and isHidden = (name) -> (name.charCodeAt(0) == charCodeUnderscore and
name.charCodeAt(1) == charCodeUnderscore) name.charCodeAt(1) == charCodeUnderscore)
dispName = (name) -> chrome.i18n.getMessage('profile_' + name) || name
actionForUrl = (url) -> actionForUrl = (url) ->
options.ready.then(-> options.ready.then(->