views:

32

answers:

2

Instead of using @require (that is GM specific) or injecting a <script> element (e.g. for pre-0.8 GMs & other browsers), I'd like to use the jQuery object that the target page already loads and uses.

Is that kind of situation feasible and how to get it working? I've tried just using the $ or jQuery but it won't work. I've also tried the GM_wait-timer-trick mentioned in the linked article, but with no go.

If it isn't going to work, why not?

A: 

Try to paste all the jquery code in user javascript file.

Happy
Not exactly qualify as using the page's jQuery object, as required.
Jawa
A: 

try using unsafeWindow. It gives access to a page's local variables.

for eg:
$ = unsafeWindow.$

Vishal Shah