diff --git a/omega-target-chromium-extension/src/coffee/background.coffee b/omega-target-chromium-extension/src/coffee/background.coffee index 5f95757..77a8e19 100644 --- a/omega-target-chromium-extension/src/coffee/background.coffee +++ b/omega-target-chromium-extension/src/coffee/background.coffee @@ -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 diff --git a/omega-target-chromium-extension/src/module/tabs.coffee b/omega-target-chromium-extension/src/module/tabs.coffee index 3cca350..8af02c3 100644 --- a/omega-target-chromium-extension/src/module/tabs.coffee +++ b/omega-target-chromium-extension/src/module/tabs.coffee @@ -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})