On 30 Jan, 10:18, esquifit <[email protected]> wrote:
> The first version (downloading the file each time) is explained here [1].
> As for the second approach add a @require line to the script's header
>
> @require jQuery http://<url of the jquery file>
>
> In the script's body, use the same code as before ([1]) but replacing
>   GM_JQ.src = 'http:...'
> with
>   GM_JQ.textContent = GM_getResourceText('jQuery');  // or maybe 
> GM_JQ.innerHTML
>
> I'm not sure whether GM_wait() is necessary at all in this case, but
> it doesn't hurt anyway.
> I don't know whether Chrome supports the @require header, so maybe in
> this case you'll have to resort to the first approach.
> You'll find an example under [2].
>
> Tip: whenever you look for examples of use of some
> object/technique/etc in userscripts, make a Google search like:
>
> site:userscripts.org inurl:scripts/review  <search term>
>
> For me it has proven to be very useful.
>
> [1]http://joanpiedra.com/jquery/greasemonkey/
> [2]http://userscripts.org/scripts/review/50771
>
>

Maby I'm looking at the wrong place, but url [2] is using @resource,
and Google Chrome does not support @require and @resource.

Url [1] looks interesting. But will it work if Google already has
jQuery loaded on a specific page?

Kia

-- 
You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/greasemonkey-users?hl=en.

Reply via email to