diff --git a/omega-target-chromium-extension/src/coffee/background.coffee b/omega-target-chromium-extension/src/coffee/background.coffee index 52cb1cc..feb7b40 100644 --- a/omega-target-chromium-extension/src/coffee/background.coffee +++ b/omega-target-chromium-extension/src/coffee/background.coffee @@ -255,12 +255,15 @@ options.currentProfileChanged = (reason) -> if currentName title = chrome.i18n.getMessage('browserAction_titleWithResult', [ currentName, '', details]) + shortTitle = 'Omega: ' + currentName # TODO: I18n. else title = details + shortTitle = 'Omega: ' + details # TODO: I18n. if external and current.profileType != 'SystemProfile' message = chrome.i18n.getMessage('browserAction_titleExternalProxy') title = message + '\n' + title + shortTitle = 'Omega-Extern: ' + details # TODO: I18n. options.setBadge() if not current.name or not OmegaPac.Profiles.isInclusive(current) @@ -271,6 +274,7 @@ options.currentProfileChanged = (reason) -> tabs.resetAll( icon: icon title: title + shortTitle: shortTitle ) encodeError = (obj) -> diff --git a/omega-target-chromium-extension/src/module/tabs.coffee b/omega-target-chromium-extension/src/module/tabs.coffee index 7dc5104..5a1cd00 100644 --- a/omega-target-chromium-extension/src/module/tabs.coffee +++ b/omega-target-chromium-extension/src/module/tabs.coffee @@ -25,7 +25,10 @@ class ChromeTabs tabs.forEach (tab) => @_dirtyTabs[tab.id] = tab.id @onUpdated tab.id, {}, tab if tab.active - chrome.browserAction.setTitle({title: action.title}) + if chrome.browserAction.setPopup? + chrome.browserAction.setTitle({title: action.title}) + else + chrome.browserAction.setTitle({title: action.shortTitle}) @setIcon(action.icon) onUpdated: (tabId, changeInfo, tab) -> @@ -41,6 +44,11 @@ class ChromeTabs for own id of @_badgeTab try chrome.browserAction.setBadgeText?(text: '', tabId: id) @_badgeTab = null + + if not chrome.browserAction.setPopup? + # TODO: Is there a way to show current proxy for page? Is there even + # enough space? + return if not tab.url? or tab.url.indexOf("chrome") == 0 if @_defaultAction chrome.browserAction.setTitle({