//img.src = GM_getResourceText("downloadIcon");
img.src = 'http://img.photobucket.com/albums/v215/thegooddale/49569412.png';
--
You received this message because you are subscribed to the Google Groups "greasemonkey-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/greasemonkey-users/-/edj8igQr2NoJ.
To post to this group, send email to greasemon...@googlegroups.com.
To unsubscribe from this group, send email to greasemonkey-us...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/greasemonkey-users?hl=en.
Loading image
Click anywhere to cancel
Image unavailable
Because you're doing it inside a DOMNodeInserted callback. This is issue https://github.com/greasemonkey/greasemonkey/issues/1001 with documented workaround http://wiki.greasespot.net/0.7.20080121.0_compatibility#Workaround (which is the first result from a search for https://www.google.com/search?q=%22Greasemonkey+access+violation%22 "Greasemonkey access violation").
You should probably call GM_getResourceText at the top level, and store it in a variable that will be accessible at callback time.On Sun, May 13, 2012 at 10:35 PM, Yansky <thego...@gmail.com> wrote:
Hi, I'm getting the following error and I'm not sure why: Error: Greasemonkey access violation: unsafeWindow cannot call GM_getResourceText.
My script is here: http://userscripts.org/scripts/show/133203
source: http://userscripts.org/scripts/review/133203
I've temporarily commented out the line that's causing the error and replaced it with a hard-link to the image://img.src = GM_getResourceText("downloadIcon"); img.src = 'http://img.photobucket.com/albums/v215/thegooddale/49569412.png';
Anyone have any ideas as to why I'm getting this error?
--