diff options
| author | Stephen Blott | 2015-05-14 10:05:05 +0100 |
|---|---|---|
| committer | Stephen Blott | 2015-05-14 10:05:05 +0100 |
| commit | 2dcd2aa91c7c9912a9fb7a290fa206467359cc33 (patch) | |
| tree | 027b82b532ff2b383a23619b3a56d09e0c5260aa /background_scripts/completion.coffee | |
| parent | 851c34015053f2d774b626b674e19ad984f38a36 (diff) | |
| download | vimium-2dcd2aa91c7c9912a9fb7a290fa206467359cc33.tar.bz2 | |
Tweak comments.
Diffstat (limited to 'background_scripts/completion.coffee')
| -rw-r--r-- | background_scripts/completion.coffee | 11 |
1 files changed, 6 insertions, 5 deletions
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}=[^&]+" ] |
