I'm developing a Greasemonkey script to be used only with Firefox, and I need some help. I'm planning to use jQuery, and possibly some other scripts later on. Since the @require
for GM only downloads the script at the initial install, later updates to the code won't download updates to external scripts.
Therefore, i was wondering: What happens if I paste in the raw jQuery code? IE the one found here: http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js
Would it cause errors? What if the website on which the script is used uses jQuery 1.3.2 and I paste in jQuery 1.4.2 into the page, or vice-versa? Basically, what are the disadvantages or errors caused if I paste in the full source for scripts like jQuery, jQuery UI etc?
Thanks!
I've done this before - one long jQuery line near the top. It's not elegant, but it works fine for the time being, and works as expected. Variables in your Greasemonkey script do not affect the webpage itself, unless you explicitly access the webpage's scope via unsafeWindow
.
It was a while ago, however, and I believe jQuery 1.4 does not work with this method anymore. If using 1.3 is an option, try that, instead.