diff options
| author | Stephen Blott | 2014-12-30 06:07:20 +0000 |
|---|---|---|
| committer | Stephen Blott | 2014-12-30 06:19:35 +0000 |
| commit | 774915f3967655ab800cc3c1ac73f0746618d3de (patch) | |
| tree | d2acf99f570ec63c6d48d5e015e2c2c98bd65394 /content_scripts | |
| parent | b5e9dcb5f87391c0da937517182889eb47ec8f0a (diff) | |
| download | vimium-774915f3967655ab800cc3c1ac73f0746618d3de.tar.bz2 | |
Minor changes to vomnibar-in-iframe.
From top to bottom on the diff:
- The echo handler on the background page is no longer required.
- Simplify/refactor vomnibarUI message handler.
- Initialise vomnibar query to "" (rather than null) and simplify.
- No need to focus parent window when vomnibar closes; that's handled by
the iframe framework. Also no need to blur.
Diffstat (limited to 'content_scripts')
| -rw-r--r-- | content_scripts/vomnibar.coffee | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/content_scripts/vomnibar.coffee b/content_scripts/vomnibar.coffee index 6b82d31c..0d5197a5 100644 --- a/content_scripts/vomnibar.coffee +++ b/content_scripts/vomnibar.coffee @@ -37,12 +37,8 @@ Vomnibar = init: -> unless @vomnibarUI? - @vomnibarUI = new UIComponent "pages/vomnibar.html", "vomnibarFrame", @handleMessage.bind this - - handleMessage: (event) -> - if event.data == "hide" - @hide() - + @vomnibarUI = new UIComponent "pages/vomnibar.html", "vomnibarFrame", => + @vomnibarUI.hide() # This function opens the vomnibar. It accepts options, a map with the values: # completer - The completer to fetch results from. @@ -51,7 +47,5 @@ Vomnibar = # newTab - Optional, boolean. Whether to open the result in a new tab. open: (options) -> @vomnibarUI.activate options - hide: -> @vomnibarUI?.hide() - root = exports ? window root.Vomnibar = Vomnibar |
