From 7a746ba51a5124a39acb09270bf4ab470bfd6b5f Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Mon, 16 Feb 2015 16:57:44 +0000 Subject: 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. --- background_scripts/main.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'background_scripts') 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) -- cgit v1.2.3