diff options
| author | Stephen Blott | 2015-01-02 10:24:39 +0000 | 
|---|---|---|
| committer | Stephen Blott | 2015-01-02 11:01:03 +0000 | 
| commit | 20ebbf3de2384738af916a441470d74a5aca14a3 (patch) | |
| tree | b477a0e03097e5368668dbe08a42e48dbd8db132 /background_scripts | |
| parent | b5535bc5a1b44c12cff62bac601a8d6ec7e04a6c (diff) | |
| download | vimium-20ebbf3de2384738af916a441470d74a5aca14a3.tar.bz2 | |
Modes; rework badge handling and fix passkeys mode.
Diffstat (limited to 'background_scripts')
| -rw-r--r-- | background_scripts/main.coffee | 7 | 
1 files changed, 2 insertions, 5 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index 7d7359b8..3ce05a49 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -342,9 +342,8 @@ setBrowserActionIcon = (tabId,path) ->  # This color should match the blue of the Vimium browser popup (although it looks a little darker, to me?).  chrome.browserAction.setBadgeBackgroundColor {color: [102, 176, 226, 255]} -setBadge = (response) -> -  badge = response?.badge || "" -  chrome.browserAction.setBadgeText {text: badge} +setBadge = (request) -> +  chrome.browserAction.setBadgeText {text: request.badge || ""}  # Updates the browserAction icon to indicate whether Vimium is enabled or disabled on the current page.  # Also propagates new enabled/disabled/passkeys state to active window, if necessary. @@ -356,7 +355,6 @@ root.updateActiveState = updateActiveState = (tabId) ->    partialIcon = "icons/browser_action_partial.png"    chrome.tabs.get tabId, (tab) ->      chrome.tabs.sendMessage tabId, { name: "getActiveState" }, (response) -> -      setBadge response        if response          isCurrentlyEnabled = response.enabled          currentPasskeys = response.passKeys @@ -610,7 +608,6 @@ unregisterFrame = (request, sender) ->        frameIdsForTab[tabId] = frameIdsForTab[tabId].filter (id) -> id != request.frameId  handleFrameFocused = (request, sender) -> -  setBadge request    tabId = sender.tab.id    if frameIdsForTab[tabId]?      frameIdsForTab[tabId] =  | 
