aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts/main.coffee
diff options
context:
space:
mode:
Diffstat (limited to 'background_scripts/main.coffee')
-rw-r--r--background_scripts/main.coffee7
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] =