Open cletusc opened 12 years ago
I also have that problem and I'm still looking for a solution.
See: http://userscripts.org/scripts/show/140556 See: http://userscripts.org/topics/115200?page=1
a Fork from raphale-min.js to https://raw.github.com/Capatcha/raphael/master/raphael-min-2.1.0-GM.js
You can generate it similary like: sed -e "s/window.Raphael/Raphael/g" raphel-min.js >raphael-min-2.1-GM.js
Many thanks my friend :)
This is in regards to this thread: http://userscripts.org/topics/115200 When trying to use Raphael with Greasemonkey, I am getting an error as though it isn't loading.
Simplified test case
Note that once Raphael is actually defined, it works as intended.
Using
Firefox v15.0 Greasemonkey v1.0 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0
Possible cause
When digging around for the possible cause of this, I found a change that DOES fix it. raphael.js, Line 3738 Change
oldRaphael.was ? (g.win.Raphael = R) : (Raphael = R);
tooldRaphael.was ? (g.win.Raphael = R) : (g.win.Raphael = R);
or simplyg.win.Raphael = R;
This seems to fix it, but then again I don't know of the side effects. From the looks of it, that line just checks to see if Raphael exists and overwrites it, otherwise it just creates a new variable.
Is this a known issue or has anyone else had any success with Raphael and Greasemonkey?