aboutsummaryrefslogtreecommitdiffstats
path: root/pages
diff options
context:
space:
mode:
authorStephen Blott2018-02-18 11:31:57 +0000
committerStephen Blott2018-02-18 11:36:51 +0000
commit6cef4caf7a21fdf7e8b52a6d8145d024c3ca6d19 (patch)
treea71d4ee48f520e9a8eb3780c44e108d75a144235 /pages
parent509d93f88112e0bfd0a47ac454e897156f00da14 (diff)
downloadvimium-6cef4caf7a21fdf7e8b52a6d8145d024c3ca6d19.tar.bz2
allow javascript: URLs for custom search engines.
For example, search the current site: cd: javascript:location='http://www.google.com/search?num=100&q=site:'+escape(location.hostname)+'+%s' Apparently an example like this has been on the Wiki for four years, but it has not been supported. However, the change is so trivial that it's worth doing anyway. Fixes #2956.
Diffstat (limited to 'pages')
-rw-r--r--pages/vomnibar.coffee1
1 files changed, 1 insertions, 0 deletions
diff --git a/pages/vomnibar.coffee b/pages/vomnibar.coffee
index c53e7170..01533b5f 100644
--- a/pages/vomnibar.coffee
+++ b/pages/vomnibar.coffee
@@ -167,6 +167,7 @@ class VomnibarUI
# avoid a race condition, we construct the query from the actual contents of the input (query).
query = Utils.createSearchUrl query, @lastReponse.engine.searchUrl if isCustomSearchPrimarySuggestion
@hide ->
+ openInNewTab &&= not Utils.hasJavascriptPrefix query
chrome.runtime.sendMessage
handler: if openInNewTab then "openUrlInNewTab" else "openUrlInCurrentTab"
url: query