aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts
diff options
context:
space:
mode:
authorStephen Blott2014-11-07 18:41:06 +0000
committerStephen Blott2014-11-08 06:01:36 +0000
commit7d7efb77270c6cd9527e788bdae9a862ced59d81 (patch)
treec39a6e276a29a7e244886add04d0c708c530d59e /background_scripts
parent422a87e1e664ea86edf3e628d465ac700af404d0 (diff)
downloadvimium-7d7efb77270c6cd9527e788bdae9a862ced59d81.tar.bz2
Order tabs; tidy up.
Diffstat (limited to 'background_scripts')
-rw-r--r--background_scripts/completion.coffee8
1 files changed, 4 insertions, 4 deletions
diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee
index 9b22cd29..141c4ad7 100644
--- a/background_scripts/completion.coffee
+++ b/background_scripts/completion.coffee
@@ -259,8 +259,8 @@ class DomainCompleter
# Suggestions from the Domain completer have the maximum relevancy. They should be shown first in the list.
computeRelevancy: -> 1
-# TabCache associates a timestamp with each tab.
-class TabCache
+# TabRecency associates a timestamp with each tab id.
+class TabRecency
constructor: ->
@timestamp = 1
@cache = {}
@@ -280,7 +280,7 @@ class TabCache
@cache[tabId] ||= 1
if @cache[tabId] == @timestamp then 0.0 else @cache[tabId] / @timestamp
-tabCache = new TabCache()
+tabRecency = new TabRecency()
# Searches through all open tabs, matching on title and URL.
class TabCompleter
@@ -300,7 +300,7 @@ class TabCompleter
if 0 < suggestion.queryTerms.length
RankingUtils.wordRelevancy(suggestion.queryTerms, suggestion.url, suggestion.title)
else
- tabCache.recencyScore suggestion.tabId
+ tabRecency.recencyScore suggestion.tabId
# A completer which will return your search engines
class SearchEngineCompleter