Greasemonkey (User Scripts) in Chrome - @include vs. @match

Posted on October 1st, 2011 by David Luhman and tagged , .

Greasemonkey uses a "@include" syntax to indicate which web sites a given script should run on.

I believe Chrome accepts the older "@include" syntax for the sake of compatability, but Chrome prefers a "@match" syntax.

For example,
@match http://*.google.com
will run the indicated script on any google.com domain.

http://www.chromium.org/developers/design-documents/user-scripts

http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions...

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options