diff options
| author | Stephen Blott | 2015-05-15 10:52:40 +0100 |
|---|---|---|
| committer | Stephen Blott | 2015-05-15 10:52:40 +0100 |
| commit | ae44f35a653e76a2efbcb29f83c3fefa0ee0ab78 (patch) | |
| tree | 1187bf04798384874c46738174191290c675d7f8 | |
| parent | 623f770324ae86edd3a8d1817164a79656967ade (diff) | |
| download | vimium-ae44f35a653e76a2efbcb29f83c3fefa0ee0ab78.tar.bz2 | |
Better explaination of query-term extract.
| -rw-r--r-- | background_scripts/completion.coffee | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee index 011fbdfb..82a8f310 100644 --- a/background_scripts/completion.coffee +++ b/background_scripts/completion.coffee @@ -236,10 +236,11 @@ class HistoryCompleter onComplete results.map (entry) => # If this history URL starts with the search URL, we reconstruct the original search terms, and insert # them into the vomnibar when this suggestion is selected. We use try/catch because - # decodeURIComponent() throw an error. + # decodeURIComponent() can throw an error. insertText = try if entry.url.startsWith searchUrl + # This maps "https://www.google.ie/search?q=star+wars&..." to "star wars". entry.url[searchUrl.length..].split(searchUrlTerminator)[0].split("+").map(decodeURIComponent).join " " catch null |
