I'd like to ask a question about my modifications to jQuery so it
works as designed in greasemonkey.

First I'll tell you what I do to make things work.
I'd like the script to work in both chrome and firefox (at least).
This means I can't load jQuery by adding it to the page (chrome
doesn't allow that), or by using @require (again chrome). So I put the
whole (minified version of) jquery code into the script. This allows
me to make some modifications to it.

Steps:
1.) download jquery source
2.) adjust the thing that gives errors, eventSupported. Since it's
only used twice to check whether submit and change bubble, and only IE
seems to do this wrong, I just remove the function and put the value
to true.
        jQuery.support.submitBubbles = true;
        jQuery.support.changeBubbles = true;

3.) Remove the html.mozMatchesSelector, which causes some basic
functions like .is() to fail.
4.) minify the result (google closure minification atm) and add it to
the script.

This seems to work. But I keep wondering whether the 3rd step could be
done better. It basically tries to use the mozilla matching selector,
which is retrieved through
document.document.Element.mozMatchesSelector. Greasemonkey seems to
think it exists, but gives an error when actually calling the
function. By not using it, I probably loose some performance in
Firefox.
Is there a way to properly access this function in greasemonkey?

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