[Greasemonkey] insertBefore(document.body) glitch

Aaron Boodman zboogs at gmail.com
Tue Jul 12 15:06:35 EDT 2005

Could you test the double echo by using something other than inserting
into the DOM? For instance, alert.

if (window == top) alert("hello");

If you only get one, than this is probably a side effect of a known
issue with manipulating the DOM in DOMContentLoaded, which is when
Greasemonkey injection happens.

If that is true, then the fix is:

window.addEventListener("load", function() {
}, false);


More information about the Greasemonkey mailing list