mirror of
https://github.com/zero-peak/ZeroOmega.git
synced 2025-01-22 15:08:12 -05:00
Fix #1159. Root cause still unclear.
This commit is contained in:
parent
bc317e0fbc
commit
c860de6214
@ -66,7 +66,7 @@ actionForUrl = (url) ->
|
||||
options.ready.then(->
|
||||
request = OmegaPac.Conditions.requestFromUrl(url)
|
||||
options.matchProfile(request)
|
||||
).then ({profile, results}) ->
|
||||
).then(({profile, results}) ->
|
||||
current = options.currentProfile()
|
||||
currentName = dispName(current.name)
|
||||
if current.profileType == 'VirtualProfile'
|
||||
@ -152,6 +152,7 @@ actionForUrl = (url) ->
|
||||
resultColor: resultColor
|
||||
profileColor: profileColor
|
||||
}
|
||||
).catch -> return null
|
||||
|
||||
|
||||
storage = new OmegaTargetCurrent.Storage('local')
|
||||
@ -185,6 +186,7 @@ options._inspect = new OmegaTargetCurrent.Inspect (url, tab) ->
|
||||
state.set({inspectUrl: url})
|
||||
|
||||
actionForUrl(url).then (action) ->
|
||||
return if not action
|
||||
parsedUrl = OmegaTargetCurrent.Url.parse(url)
|
||||
if parsedUrl.hostname == OmegaTargetCurrent.Url.parse(tab.url).hostname
|
||||
urlDisp = parsedUrl.path
|
||||
|
@ -54,6 +54,9 @@ class ChromeTabs
|
||||
@clearIcon tab.id
|
||||
return
|
||||
@actionForUrl(tab.url).then (action) =>
|
||||
if not action
|
||||
@clearIcon tab.id
|
||||
return
|
||||
@setIcon(action.icon, tab.id)
|
||||
if chrome.browserAction.setPopup?
|
||||
chrome.browserAction.setTitle({title: action.title, tabId: tab.id})
|
||||
|
Loading…
Reference in New Issue
Block a user