Greasemonkey

Using jQuery in Chrome User Scripts (Greasemonkey scripts)

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

If you want to much of anything useful in a Greasemonkey ("User") script, you'll want to use jQuery or similar library.

Greasemonkey uses a "@require" command to pull in these libraries, but Chrome won't allow this.

To include jQuery in a Chrome user script, here's a good link which pulls in jQuery by adding a element to the page you're working on.

http://erikvold.com/blog/index.cfm/2010/6/14/using-jquery-with-a-user-sc...

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...