Using jQuery in Greasemonkey

Using in (with ):

(function(){
    function myjob()
    {
        // your code...
    }

    GM_xmlhttpRequest({
        method: 'GET',
        url: 'http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js',
        onload: function(r){ eval(r.responseText); myjob(); }
        });
})();

1 Response to “Using jQuery in Greasemonkey”


  1. 1 Jacky

    It seems that you can use @require to include the library in the new version of greasemonkey: http://wiki.greasespot.net/Metadata_block#.40require .

Leave a Reply