aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--background_scripts/completion.coffee10
-rw-r--r--background_scripts/settings.coffee1
-rw-r--r--pages/options.html3
3 files changed, 8 insertions, 6 deletions
diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee
index 6f0b9a73..aa7ed4bc 100644
--- a/background_scripts/completion.coffee
+++ b/background_scripts/completion.coffee
@@ -10,7 +10,7 @@
# - refresh(): (optional) refreshes the completer's data source (e.g. refetches the list of bookmarks).
# - cancel(): (optional) cancels any pending, cancelable action.
class Suggestion
- showRelevancy: false # Set this to true to render relevancy when debugging the ranking scores.
+ showRelevancy: true # Set this to true to render relevancy when debugging the ranking scores.
constructor: (@options) ->
# Required options.
@@ -54,6 +54,7 @@ class Suggestion
<div class="vimiumReset vomnibarTopHalf">
<span class="vimiumReset vomnibarSource #{insertTextClass}">#{insertTextIndicator}</span><span class="vimiumReset vomnibarSource">#{@type}</span>
<span class="vimiumReset vomnibarTitle">#{@highlightQueryTerms Utils.escapeHtml @title}</span>
+ #{relevancyHtml}
</div>
"""
else
@@ -466,7 +467,7 @@ class SearchEngineCompleter
{ keyword, searchUrl, description } = engine
extend request, searchUrl, customSearchMode: true
- factor = Math.max 0.0, Math.min 1.0, Settings.get "omniSearchWeight"
+ factor = 0.5
haveCompletionEngine = CompletionSearch.haveCompletionEngine searchUrl
# This filter is applied to all of the suggestions from all of the completers, after they have been
@@ -519,7 +520,6 @@ class SearchEngineCompleter
highlightTermsExcludeUrl: true
isCustomSearch: true
relevancyFunction: @computeRelevancy
- relevancyData: factor
cachedSuggestions =
if haveCompletionEngine then CompletionSearch.complete searchUrl, queryTerms else null
@@ -544,7 +544,7 @@ class SearchEngineCompleter
# lowest-ranked suggestion from another completer (and there are already 10 suggestions), then
# there's no need to query the completion engine.
perfectRelevancyScore = @computeRelevancy new Suggestion
- queryTerms: queryTerms, title: queryTerms.join(" "), relevancyData: factor
+ queryTerms: queryTerms, title: queryTerms.join " "
if 10 <= suggestions.length and perfectRelevancyScore < suggestions[suggestions.length-1].relevancy
console.log "skip (cannot make the grade):", suggestions.length, query if SearchEngineCompleter.debug
@@ -560,7 +560,7 @@ class SearchEngineCompleter
# scores here, and those provided by other completers.
# - Relevancy depends only on the title (which is the search terms), and not on the URL.
Suggestion.boostRelevancyScore 0.5,
- relevancyData * RankingUtils.wordRelevancy queryTerms, title, title
+ 0.7 * RankingUtils.wordRelevancy queryTerms, title, title
postProcessSuggestions: (request, suggestions) ->
return unless request.searchEngines
diff --git a/background_scripts/settings.coffee b/background_scripts/settings.coffee
index 269b4a2c..d23649ee 100644
--- a/background_scripts/settings.coffee
+++ b/background_scripts/settings.coffee
@@ -43,7 +43,6 @@ root.Settings = Settings =
# or strings
defaults:
scrollStepSize: 60
- omniSearchWeight: 0.4
smoothScroll: true
keyMappings: "# Insert your preferred key mappings here."
linkHintCharacters: "sadfjklewcmpgh"
diff --git a/pages/options.html b/pages/options.html
index 8535823d..0fa5b18d 100644
--- a/pages/options.html
+++ b/pages/options.html
@@ -238,6 +238,8 @@ b: http://b.com/?q=%s description
</tr>
<!-- Vimium Labs -->
+ <!--
+ Disabled. But we leave this code here as a template for the next time we need to introduce "Vimium Labs".
<tr>
<td colspan="2"><header>Vimium Labs</header></td>
</tr>
@@ -263,6 +265,7 @@ b: http://b.com/?q=%s description
<input id="omniSearchWeight" type="number" min="0.0" max="1.0" step="0.05" />(0 to 1)
</td>
</tr>
+ -->
</tbody>
</table>
</div>