Skip to content

Commit

Permalink
fix firefox startupProfileName doesn't work problem.
Browse files Browse the repository at this point in the history
  • Loading branch information
suziwen committed Aug 14, 2024
1 parent 748710a commit 0be8c27
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions omega-target-chromium-extension/src/coffee/background.coffee
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
zeroBackground = (zeroStorage, opts) ->
OmegaTargetCurrent = Object.create(OmegaTargetChromium)
Promise = OmegaTargetCurrent.Promise
Promise.longStackTraces()
OmegaTargetCurrent = Object.create(OmegaTargetChromium)
Promise = OmegaTargetCurrent.Promise
Promise.longStackTraces()

OmegaTargetCurrent.Log = Object.create(OmegaTargetCurrent.Log)
Log = OmegaTargetCurrent.Log
OmegaTargetCurrent.Log = Object.create(OmegaTargetCurrent.Log)
Log = OmegaTargetCurrent.Log

# TODO 将来可能代码需要重构下,这里写得有点乱. (suziwen1@gmail.com)
globalThis.isBrowserRestart = globalThis.startupCheck is undefined
startupCheck = globalThis.startupCheck ?= -> true
globalThis.isBrowserRestart = globalThis.startupCheck is undefined
startupCheck = globalThis.startupCheck ?= -> true

chrome.runtime.onStartup.addListener ->
globalThis.isBrowserRestart = true

chrome.runtime.onStartup.addListener ->
globalThis.isBrowserRestart = true

dispName = (name) -> chrome.i18n.getMessage('profile_' + name) || name

zeroBackground = (zeroStorage, opts) ->
unhandledPromises = []
unhandledPromisesId = []
unhandledPromisesNextId = 1
Expand Down Expand Up @@ -69,7 +71,6 @@ zeroBackground = (zeroStorage, opts) ->
isHidden = (name) -> (name.charCodeAt(0) == charCodeUnderscore and
name.charCodeAt(1) == charCodeUnderscore)

dispName = (name) -> chrome.i18n.getMessage('profile_' + name) || name

actionForUrl = (url) ->
options.ready.then(->
Expand Down

0 comments on commit 0be8c27

Please sign in to comment.