diff options
| author | Stephen Blott | 2015-05-02 11:34:18 +0100 |
|---|---|---|
| committer | Stephen Blott | 2015-05-02 14:35:49 +0100 |
| commit | 1257fc7a4fe7b9d0bfe1ad7ab7255f8dba4b988d (patch) | |
| tree | a670fa11a6a916084a707168b041f949c9817140 | |
| parent | d848f50fb1c199de581bf63e18495b7f4d0c4faf (diff) | |
| download | vimium-1257fc7a4fe7b9d0bfe1ad7ab7255f8dba4b988d.tar.bz2 | |
Search completion; do not complete URLs.
| -rw-r--r-- | background_scripts/search_engines.coffee | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/background_scripts/search_engines.coffee b/background_scripts/search_engines.coffee index 485accc1..5d69d087 100644 --- a/background_scripts/search_engines.coffee +++ b/background_scripts/search_engines.coffee @@ -89,6 +89,12 @@ SearchEngines = complete: (searchUrl, queryTerms, callback) -> return callback [] unless 0 < queryTerms.length + # Don't try to complete general URLs. + return callback [] if 1 == queryTerms.length and Utils.isUrl queryTerms[0] + + # Don't try to complete Javascrip URLs. + return callback [] if 0 < queryTerms.length and Utils.hasJavascriptPrefix queryTerms[0] + engine = @lookupEngine searchUrl url = engine.getUrl queryTerms @get searchUrl, url, (xhr = null) -> |
