From fd4d81c276accbe8612e17ff5467c762c5c0c277 Mon Sep 17 00:00:00 2001 From: Phil Crosby Date: Sun, 29 Apr 2012 23:19:32 -0700 Subject: Add comments to explain what's going on. --- lib/completion.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/completion.js b/lib/completion.js index c46723c7..165aa86d 100644 --- a/lib/completion.js +++ b/lib/completion.js @@ -185,8 +185,11 @@ var completion = (function() { }); } - /** A domain completer as it is provided by Chrome's omnibox */ + /* + * A completer which matches only domains from sites in your history with the current query. + */ var DomainCompletionSource = Class.extend({ + // A mapping of doamin => useHttps, where useHttps is a boolean. domains: null, withDomains: function(callback) { @@ -212,6 +215,7 @@ var completion = (function() { self.domains[domain] = !!https; delete self.domains['www.' + domain]; } + function processUrl(url) { parts = url.split('/'); processDomain(parts[2], parts[0] == 'https:'); -- cgit v1.2.3