[Greasemonkey] making http requests and waiting for completion
jdunck at gmail.com
Wed Aug 10 18:35:13 EDT 2005
On 8/10/05, Bernd Fuhrmann <silverbanana at gmx.de> wrote:
>This script has to remove some parts of a web page, including
> script elements, that do things that are disturbing.
GM does not execute early enough to stop content scripts from running,
You might be be able to do some good, but it depends on both the
content and what you're trying to accomplish.
> GM_xmlhttpRequest to retrieve the real script and than eval to execute
> it, but the problem is that at time when this is done, some of the
> script-elements in the document are already executed.
This is a security risk if there is any opportunity that the file
served remotely will ever be changed. Don't do it if you don't know
what you're doing and don't understand the risks involved. A bad GM
script can keylog, give away your first born, and kill cats. Careful!
> So is there any
> way to wait for GM_xmlhttpRequest until it has completed the onload method?
Not sure I understand this part.
More information about the Greasemonkey