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

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