mirror of
https://github.com/zero-peak/ZeroOmega.git
synced 2025-02-02 02:58:13 -05:00
Shorten the menu title on mobile.
This commit is contained in:
parent
b40ff3d36c
commit
d8684c6d24
@ -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) ->
|
||||
|
@ -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({
|
||||
|
Loading…
Reference in New Issue
Block a user