diff options
| author | Phil Crosby | 2012-08-19 09:58:57 -0700 | 
|---|---|---|
| committer | Phil Crosby | 2012-08-19 09:58:57 -0700 | 
| commit | 3001bdc53c160c3606ef6903d71db675f4ffcb9a (patch) | |
| tree | e2937f83b7a928a3bd0914f9e43e15c7304b9344 /background_scripts/main.js | |
| parent | 486ba68a42e2ba7b96a7a14b0ae34aca7ac7e780 (diff) | |
| parent | 038ae30e4275aa5b59d84833f2cdca38a40bfc71 (diff) | |
| download | vimium-3001bdc53c160c3606ef6903d71db675f4ffcb9a.tar.bz2 | |
Merge pull request #618 from dmacdougall/browser_action_icon
Re-enable browser action icon
Diffstat (limited to 'background_scripts/main.js')
| -rw-r--r-- | background_scripts/main.js | 11 | 
1 files changed, 4 insertions, 7 deletions
| diff --git a/background_scripts/main.js b/background_scripts/main.js index 287af48e..5f5df508 100644 --- a/background_scripts/main.js +++ b/background_scripts/main.js @@ -359,16 +359,13 @@ function updateOpenTabs(tab) {   * 3. Active tab is enabled but should be disabled -> disable icon and disable vimium   */  function updateActiveState(tabId) { -  // TODO(philc): Re-enable once we've restyled the browser action icon. -  return; -  var enabledIcon = "icons/icon48.png"; -  var disabledIcon = "icons/icon48disabled.png"; +  var enabledIcon = "icons/browser_action_enabled.png"; +  var disabledIcon = "icons/browser_action_disabled.png";    chrome.tabs.get(tabId, function(tab) {      // Default to disabled state in case we can't connect to Vimium, primarily for the "New Tab" page. -    // TODO(philc): Re-enable once we've restyled the browser action icon. -    // chrome.browserAction.setIcon({ path: disabledIcon }); +    chrome.browserAction.setIcon({ path: disabledIcon });      chrome.tabs.sendRequest(tabId, { name: "getActiveState" }, function(response) { -      var isCurrentlyEnabled = response.enabled; +      var isCurrentlyEnabled = response !== undefined && response.enabled;        var shouldBeEnabled = isEnabledForUrl({url: tab.url}).isEnabledForUrl;        if (isCurrentlyEnabled) { | 
