diff options
| -rw-r--r-- | background_scripts/main.coffee | 7 | ||||
| -rw-r--r-- | content_scripts/vomnibar.coffee | 10 | ||||
| -rw-r--r-- | pages/vomnibar.coffee | 6 |
3 files changed, 4 insertions, 19 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index d01a3f6c..44ab5bac 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -622,12 +622,6 @@ handleFrameFocused = (request, sender) -> frameIdsForTab[tabId] = [request.frameId, (frameIdsForTab[tabId].filter (id) -> id != request.frameId)...] -# Send message back to the tab unchanged. This allows different frames from the same tab to message eachother -# while avoiding security concerns such as eavesdropping or message spoofing. -echo = (request, sender) -> - delete request.handler # No need to send this information - chrome.tabs.sendMessage(sender.tab.id, request) - # Port handler mapping portHandlers = keyDown: handleKeyDown, @@ -654,7 +648,6 @@ sendRequestHandlers = refreshCompleter: refreshCompleter createMark: Marks.create.bind(Marks) gotoMark: Marks.goto.bind(Marks) - echo: echo # Convenience function for development use. window.runTests = -> open(chrome.runtime.getURL('tests/dom_tests/dom_tests.html')) 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 diff --git a/pages/vomnibar.coffee b/pages/vomnibar.coffee index 2d5fdd1c..170f1b42 100644 --- a/pages/vomnibar.coffee +++ b/pages/vomnibar.coffee @@ -19,7 +19,7 @@ Vomnibar = activate: (userOptions) -> options = completer: "omni" - query: null + query: "" newTab: false selectFirst: false extend options, userOptions @@ -35,7 +35,7 @@ Vomnibar = @vomnibarUI.setCompleter(completer) @vomnibarUI.setRefreshInterval(options.refreshInterval) @vomnibarUI.setForceNewTab(options.newTab) - @vomnibarUI.setQuery(options.query) if options.query + @vomnibarUI.setQuery(options.query) @vomnibarUI.update() class VomnibarUI @@ -57,8 +57,6 @@ class VomnibarUI setForceNewTab: (forceNewTab) -> @forceNewTab = forceNewTab hide: -> - @input.blur() - window.parent.focus() UIComponentServer.postMessage "hide" @reset() |
