Greasemonkey APIs are only going to work inside Greasemonkey scripts.
On 1/28/2012 7:25 AM, ul313 wrote:
I wrote a greasemonkey script which uses GM_xmlHttpRequest(i need it
because cross-domain usage). When i compile extension with that code
everything works fine. But, i want to place that code on remote
server, so i don't need to recompile extension every time i need to
change something. This is code that i used
var extjs = document.createElement('script');
extjs.setAttribute('type', 'text/javascript');
extjs.setAttribute('src', 'http://link.to.file');
var head = document.getElementsByTagName('head')[0];
head.appendChild(scobj);
But this doesn't seem to work well. Because GM_xmlhttprequest dont
work. Is there any other way to make it work? I think that probably
problem is because js is loading into page you visited, not directly
in extension... I need it for firefox and chrome. As I said, when i
compile whole code in extension (without loading external js), it
works well both in chrome and firefox.
--
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.