From 3646b8c999a9e4b864e8c529f84b64a3c2c74ff0 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Mon, 18 May 2015 15:06:46 +0100 Subject: Revert "Search completion; promote the top completion." This reverts commit 4309dcd3030687f3ed02b86bbdf7c485baaee4a5. This is a bad idea. It pushes the suggestion at the top of the list out of the way. Users aren't going to like that if it's the one they're looking for. Conflicts: background_scripts/completion.coffee --- background_scripts/completion.coffee | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'background_scripts') diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee index 39ec66c5..3e7cfe06 100644 --- a/background_scripts/completion.coffee +++ b/background_scripts/completion.coffee @@ -289,7 +289,7 @@ class DomainCompleter queryTerms: queryTerms type: "domain" url: domains[0]?[0] ? "" # This is the URL or an empty string, but not null. - relevancy: 2 + relevancy: 1 ].filter (s) -> 0 < s.url.length # Returns a list of domains of the form: [ [domain, relevancy], ... ] @@ -499,7 +499,7 @@ class SearchEngineCompleter type: description url: Utils.createSearchUrl queryTerms, searchUrl title: queryTerms.join " " - relevancy: 2 + relevancy: 1 autoSelect: custom highlightTerms: not haveCompletionEngine isSearchSuggestion: true @@ -511,15 +511,12 @@ class SearchEngineCompleter @previousSuggestions[url] = new Suggestion queryTerms: queryTerms type: description - url: Utils.createSearchUrl suggestion, searchUrl + url: url title: suggestion insertText: suggestion highlightTerms: false highlightTermsExcludeUrl: true isCustomSearch: custom - # The first (top) suggestion gets a score of 1. This puts it two s away if a domain completion - # is present (which has a score of 2), and one away otherwise. - relevancy: if 0 < count++ then null else 1 relevancyFunction: @computeRelevancy relevancyData: factor -- cgit v1.2.3