diff options
| author | Michael SALIHI | 2015-09-10 10:54:22 +0200 | 
|---|---|---|
| committer | Michael SALIHI | 2015-09-10 10:54:22 +0200 | 
| commit | 3c1c4d44b0b7aec174f4d952c0a0d0bb2babf64c (patch) | |
| tree | a9ab90a0bba5abdb7e14f260900d4bdbcf3f1073 /background_scripts/completion_engines.coffee | |
| parent | 238717fe4f3997389bc1f7ac35cb2cd86abdca25 (diff) | |
| download | vimium-3c1c4d44b0b7aec174f4d952c0a0d0bb2babf64c.tar.bz2 | |
Fix JSON incorrect parsing for Qwant autocompletion
Diffstat (limited to 'background_scripts/completion_engines.coffee')
| -rw-r--r-- | background_scripts/completion_engines.coffee | 3 | 
1 files changed, 2 insertions, 1 deletions
| diff --git a/background_scripts/completion_engines.coffee b/background_scripts/completion_engines.coffee index 6c2fbf8d..3e3f772c 100644 --- a/background_scripts/completion_engines.coffee +++ b/background_scripts/completion_engines.coffee @@ -149,7 +149,8 @@ class Qwant extends BaseEngine          searchUrl: "https://www.qwant.com/?q=%s"          keyword: "qw" -  parse: (xhr) -> JSON.parse(xhr.responseText)[1] +  parse: (xhr) -> +    suggestion.value for suggestion in JSON.parse(xhr.responseText).data.items  # A dummy search engine which is guaranteed to match any search URL, but never produces completions.  This  # allows the rest of the logic to be written knowing that there will always be a completion engine match. | 
