aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts
diff options
context:
space:
mode:
authorStephen Blott2016-12-10 10:51:57 +0000
committerGitHub2016-12-10 10:51:57 +0000
commitbd06c7ccfbfcf36e6d15fba72b7af90254b05da2 (patch)
tree0890bf5550df77e7739624c8e9a6ae619010b8a5 /content_scripts
parent856f0ff8b35a66ecfa8a77ae41f4b761c1b1951c (diff)
parent24a6217f26911ba4e934f4a7bff8bcd30c227163 (diff)
downloadvimium-bd06c7ccfbfcf36e6d15fba72b7af90254b05da2.tar.bz2
Merge pull request #2326 from smblott-github/move-search-engines-to-bg-utils
Move SearchEngines to bg-utils.coffee.
Diffstat (limited to 'content_scripts')
-rw-r--r--content_scripts/vomnibar.coffee13
1 files changed, 5 insertions, 8 deletions
diff --git a/content_scripts/vomnibar.coffee b/content_scripts/vomnibar.coffee
index 49c4288e..04499523 100644
--- a/content_scripts/vomnibar.coffee
+++ b/content_scripts/vomnibar.coffee
@@ -4,22 +4,19 @@
Vomnibar =
vomnibarUI: null
- # Parse any additional options from the command's registry entry. Currently, this only includes a flag of
- # the form "keyword=X", for direct activation of a custom search engine.
- parseRegistryEntry: (registryEntry = { options: [] }, callback = null) ->
- searchEngines = Settings.get("searchEngines") ? ""
- SearchEngines.refreshAndUse searchEngines, (engines) ->
- callback? registryEntry.options
+ # Extract any additional options from the command's registry entry.
+ extractOptionsFromRegistryEntry: (registryEntry, callback) ->
+ callback? extend {}, registryEntry.options
# sourceFrameId here (and below) is the ID of the frame from which this request originates, which may be different
# from the current frame.
activate: (sourceFrameId, registryEntry) ->
- @parseRegistryEntry registryEntry, (options) =>
+ @extractOptionsFromRegistryEntry registryEntry, (options) =>
@open sourceFrameId, extend options, completer:"omni"
activateInNewTab: (sourceFrameId, registryEntry) ->
- @parseRegistryEntry registryEntry, (options) =>
+ @extractOptionsFromRegistryEntry registryEntry, (options) =>
@open sourceFrameId, extend options, completer:"omni", newTab: true
activateTabSelection: (sourceFrameId) -> @open sourceFrameId, {