From c3d399f9467e07733340a56ca1f71b61bedad1f9 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Wed, 13 May 2015 14:38:46 +0100 Subject: Search completion; tweak constants. --- background_scripts/completion.coffee | 5 ++--- background_scripts/settings.coffee | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'background_scripts') diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee index d3d54521..8f99b90e 100644 --- a/background_scripts/completion.coffee +++ b/background_scripts/completion.coffee @@ -435,7 +435,7 @@ class SearchEngineCompleter # a useful suggestion from another completer. # characterCount = query.length - queryTerms.length + 1 - relevancy = (if custom then 0.9 else factor) * (Math.min(characterCount, 10.0)/10.0) + relevancy = (if custom then 0.9 else factor) * (Math.min(characterCount, 12.0)/12.0) # This filter is applied to all of the suggestions from all of the completers. filter = (suggestions) -> @@ -483,12 +483,11 @@ class SearchEngineCompleter # Make the first suggestion float to the top of the vomnibar (except if we would be competing with the # domain completer, which also assigns a relevancy of 1). if 0 < completions.length - if custom or (1 < queryTerms.length or /\S\s/.test query) + if custom # or (1 < queryTerms.length or /\S\s/.test query) extend completions[0], relevancy: 1 autoSelect: custom forceAutoSelect: custom - isPrimarySuggestion: custom insertText: null onComplete completions, args... diff --git a/background_scripts/settings.coffee b/background_scripts/settings.coffee index afc270fd..269b4a2c 100644 --- a/background_scripts/settings.coffee +++ b/background_scripts/settings.coffee @@ -43,7 +43,7 @@ root.Settings = Settings = # or strings defaults: scrollStepSize: 60 - omniSearchWeight: 0.6 + omniSearchWeight: 0.4 smoothScroll: true keyMappings: "# Insert your preferred key mappings here." linkHintCharacters: "sadfjklewcmpgh" -- cgit v1.2.3