Matching an empty path only in a Chrome Extension match pattern

Go To StackoverFlow.com

1

I ONLY want to match

*://www.foo.com 

with either no querystring like above, or any querystring:

*://www.foo.com/?*

Problem is, how do I match the first pattern above? My guess is I have to just match all paths then exclude all paths, then include the second pattern above.

Any better way to do this?

2012-04-04 18:30
by R.K.
Have you tried these match patterns? I believe they should work as is - abraham 2012-04-04 19:39


2

Your patterns are almost correct. The path name is required. Even when the omnibar shows www.foo.com, then the path is /.

*://www.foo.com/
*://www.foo.com/?*

Note: the last pattern matches /?test but not /index?test.
For more information, see Match patterns.

2012-04-04 20:59
by Rob W
Ads