From ae44f35a653e76a2efbcb29f83c3fefa0ee0ab78 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Fri, 15 May 2015 10:52:40 +0100 Subject: Better explaination of query-term extract. --- background_scripts/completion.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'background_scripts') 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 -- cgit v1.2.3