aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2015-06-02 15:36:36 +0100
committerStephen Blott2015-06-02 15:36:36 +0100
commita5fce54c6c5cc62a29028238f0ddacde93a0030d (patch)
treeb3fef631113259e6aa10b3e364743e1c5ccb3c51
parent5812b01c5a3cfedb16d73127a5aec4e7468fcc02 (diff)
parent06df48e113f9a31238fcdddd30db6b60af6aa1b4 (diff)
downloadvimium-a5fce54c6c5cc62a29028238f0ddacde93a0030d.tar.bz2
Merge pull request #1711 from smblott-github/google-map-duplicates
De-duplicate Google Maps URLs in vomnibar.
-rw-r--r--background_scripts/completion.coffee6
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 ]
]