diff options
| author | Stephen Blott | 2015-06-02 15:32:08 +0100 | 
|---|---|---|
| committer | Stephen Blott | 2015-06-02 15:32:08 +0100 | 
| commit | 06df48e113f9a31238fcdddd30db6b60af6aa1b4 (patch) | |
| tree | b3fef631113259e6aa10b3e364743e1c5ccb3c51 | |
| parent | 5812b01c5a3cfedb16d73127a5aec4e7468fcc02 (diff) | |
| download | vimium-06df48e113f9a31238fcdddd30db6b60af6aa1b4.tar.bz2 | |
De-duplicate Google Maps URLs in vomnibar.
In Google Maps, we get a new history entry for every pan and every zoom.
This removes such duplicates.
| -rw-r--r-- | background_scripts/completion.coffee | 6 | 
1 files changed, 5 insertions, 1 deletions
| diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee index c83066a6..0fe95cf1 100644 --- a/background_scripts/completion.coffee +++ b/background_scripts/completion.coffee @@ -166,10 +166,14 @@ class Suggestion    stripPatterns: [      # Google search specific replacements; this replaces query parameters which are known to not be helpful.      # There's some additional information here: http://www.teknoids.net/content/google-search-parameters-2012 -    [ "^https?://www\.google\.(com|ca|com\.au|co\.uk|ie)/.*[&?]q=" +    [ "^https?://www\\.google\\.(com|ca|com\\.au|co\\.uk|ie)/.*[&?]q="        "ei gws_rd url ved usg sa usg sig2 bih biw cd aqs ie sourceid es_sm"          .split(/\s+/).map (param) -> new RegExp "\&#{param}=[^&]+" ] +    # On Google maps, we get a new history entry for every pan and zoom event. +    [ "^https?://www\\.google\\.(com|ca|com\\.au|co\\.uk|ie)/maps/place/.*/@" +      [ new RegExp "/@.*" ] ] +      # General replacements; replaces leading and trailing fluff.      [ '.', [ "^https?://", "\\W+$" ].map (re) -> new RegExp re ]    ] | 
