From 2dcd2aa91c7c9912a9fb7a290fa206467359cc33 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Thu, 14 May 2015 10:05:05 +0100 Subject: Tweak comments. --- background_scripts/completion.coffee | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'background_scripts') diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee index 819e8995..16472c3b 100644 --- a/background_scripts/completion.coffee +++ b/background_scripts/completion.coffee @@ -127,7 +127,7 @@ class Suggestion previous = range mergedRanges - # Simplify a suggestion's URL (by removing those parts which aren't useful for either display or comparison). + # Simplify a suggestion's URL (by removing those parts which aren't useful for display or comparison). shortenUrl: () -> return @shortUrl if @shortUrl? url = @url @@ -138,14 +138,15 @@ class Suggestion @shortUrl = url # Patterns to strip from URLs; of the form [ [ filter, replacements ], [ filter, replacements ], ... ] - # - filter is a regexp; a URL must match this regexp first. - # - replacements (itself a list) is a list of regexps, each of which is removed from matching URLs. + # - filter is a regexp string; a URL must match this regexp first. + # - replacements (itself a list) is a list of regexp objects, each of which is removed from URLs matching + # the filter. # - # This includes some site-specific patterns for very-popular sites with URLs which don't work well in the + # Note. This includes site-specific patterns for very-popular sites with URLs which don't work well in the # vomnibar. # stripPatterns: [ - # Google search specific replacements; replaces query parameters which are known to not be helpful. + # Google search specific replacements; this replaces query parameters which are known to not be helpful. [ "^https?://www\.google\.(com|ca|com\.au|co\.uk|ie)/.*[&?]q=" "ei gws_rd url ved usg sa usg sig2".split(/\s+/).map (param) -> new RegExp "\&#{param}=[^&]+" ] -- cgit v1.2.3