aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts
diff options
context:
space:
mode:
authorStephen Blott2015-02-16 16:57:44 +0000
committerStephen Blott2015-02-16 16:57:44 +0000
commit7a746ba51a5124a39acb09270bf4ab470bfd6b5f (patch)
tree44d702746bad649173be0d0af89d7ceadcc61a3c /background_scripts
parent7cedc5d2481f61f4b0d1cbf99fbd203bb5c68b54 (diff)
downloadvimium-7a746ba51a5124a39acb09270bf4ab470bfd6b5f.tar.bz2
Fix (?) issue with browser icon showing disabled.
Following on from 6d776a9f56f05e4298577f25f0a54b924cb1f6e6, I'm still seeing issues with the browser icon showing disabled which Vimium is in fact enabled. I'm going to try this for a bit, and see if it fixes the problem.
Diffstat (limited to 'background_scripts')
-rw-r--r--background_scripts/main.coffee6
1 files changed, 3 insertions, 3 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee
index d034ffb0..39aeed36 100644
--- a/background_scripts/main.coffee
+++ b/background_scripts/main.coffee
@@ -366,8 +366,7 @@ root.updateActiveState = updateActiveState = (tabId) ->
disabledIcon = "icons/browser_action_disabled.png"
partialIcon = "icons/browser_action_partial.png"
chrome.tabs.get tabId, (tab) ->
- # Default to disabled state in case we can't connect to Vimium, primarily for the "New Tab" page.
- setBrowserActionIcon(tabId,disabledIcon)
+ setBrowserActionIcon tabId, enabledIcon
setBadge badge: ""
chrome.tabs.sendMessage tabId, { name: "getActiveState" }, (response) ->
if response
@@ -385,7 +384,8 @@ root.updateActiveState = updateActiveState = (tabId) ->
# Propagate the new state only if it has changed.
if (isCurrentlyEnabled != enabled || currentPasskeys != passKeys)
chrome.tabs.sendMessage(tabId, { name: "setState", enabled: enabled, passKeys: passKeys, incognito: tab.incognito })
-
+ else
+ setBrowserActionIcon tabId, disabledIcon
handleUpdateScrollPosition = (request, sender) ->
updateScrollPosition(sender.tab, request.scrollX, request.scrollY)