I saw a question here and a lot of blog posts about how to get jquery in greasemonkey, but I can't get anything to work.
Here is my script:
// ==UserScript== // @name Hello jQuery // @namespace http://foo.bar // @description jQuery test script // @include * // ==/UserScript==
I hope to see a warning when I refresh the page, so I can start to program something. I have tried a bunch of other things, and so far nothing is working. The script is included in the little monkey menu ...
edit: now the script part looks like this:
foo(); function foo() { $ = unsafeWindow.jQuery; $('tr td.row2:nth-child(4)').css("background-color", "#999"); }
he does not work. I know jQuery is good because I can run it from outside greasemonkey. If instead of jQuery function just say alert ('hello'); it works great; I get a warning when the page loads.
source share