diff options
| author | Stephen Blott | 2016-03-17 14:02:02 +0000 |
|---|---|---|
| committer | Stephen Blott | 2016-03-17 14:02:02 +0000 |
| commit | 744e293fb9ff65f086d06b8aeb44231db8e6331c (patch) | |
| tree | fc7adc77b6d5e8a7501c4d8bb0cac850b65817fd /content_scripts | |
| parent | 1199849d929ae20e79d8e07dbf14957d9c1029f8 (diff) | |
| download | vimium-744e293fb9ff65f086d06b8aeb44231db8e6331c.tar.bz2 | |
Refactor setIcon to the background page.
There's no need for the setting of the icon to be driven from the
content script. We first know the enabled state in the background page,
so set the icon there immediately.
Diffstat (limited to 'content_scripts')
| -rw-r--r-- | content_scripts/vimium_frontend.coffee | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 9a42266a..71327fb6 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -449,14 +449,6 @@ checkIfEnabledForUrl = do -> else if HUD.isReady() # Quickly hide any HUD we might already be showing, e.g. if we entered insert mode on page load. HUD.hide() - # Update the page icon, if necessary. - if windowIsFocused() - chrome.runtime.sendMessage - handler: "setIcon" - icon: - if isEnabledForUrl and not passKeys then "enabled" - else if isEnabledForUrl then "partial" - else "disabled" (frameIsFocused = windowIsFocused()) -> Frame.postMessage "isEnabledForUrl", {frameIsFocused, url: window.location.toString()} |
