aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts/vomnibar.coffee
diff options
context:
space:
mode:
Diffstat (limited to 'content_scripts/vomnibar.coffee')
-rw-r--r--content_scripts/vomnibar.coffee10
1 files changed, 4 insertions, 6 deletions
diff --git a/content_scripts/vomnibar.coffee b/content_scripts/vomnibar.coffee
index 66494fc2..cbd2892c 100644
--- a/content_scripts/vomnibar.coffee
+++ b/content_scripts/vomnibar.coffee
@@ -48,8 +48,7 @@ Vomnibar =
}
init: ->
- unless @vomnibarUI?
- @vomnibarUI = new UIComponent "pages/vomnibar.html", "vomnibarFrame", ->
+ @vomnibarUI ?= new UIComponent "pages/vomnibar.html", "vomnibarFrame", ->
# This function opens the vomnibar. It accepts options, a map with the values:
# completer - The completer to fetch results from.
@@ -58,10 +57,9 @@ Vomnibar =
# newTab - Optional, boolean. Whether to open the result in a new tab.
open: (sourceFrameId, options) ->
@init()
- if @vomnibarUI?.uiComponentIsReady
- # The Vomnibar cannot coexist with the help dialog (it causes focus issues).
- HelpDialog.abort()
- @vomnibarUI.activate extend options, { name: "activate", sourceFrameId, focus: true }
+ # The Vomnibar cannot coexist with the help dialog (it causes focus issues).
+ HelpDialog.abort()
+ @vomnibarUI.activate extend options, { name: "activate", sourceFrameId, focus: true }
root = exports ? window
root.Vomnibar = Vomnibar