var elmNewContent = document.createElement('div');
document.body.appendChild(elmNewContent);I would expect that this should insert an empty <div> into the page's HTML (for a page in the "include" list, and not in the "exclude" list), but it doesn't.alert('start');
var elmNewContent = document.createElement('div');
document.body.appendChild(elmNewContent);
alert('end');I do get the "start" and "end" message boxes. Similarly, I can issue log messages to the console via GM_log.insertBefore instead of appendChild; this doesn't help.How do you know if an empty div is not being inserted?Ummmm... by looking at View / Page Source....
You are not logged in, either login or create an account to post comments
If you are using View > Page Source in Firefox, that will not show any elements added by GreaseMonkey. You need to view the 'generated' source -- the Web Developer extension is useful here, and a less reliable alternative is selecting, right-clicking and choosing View Selection Source.
If you try adding a div with some content, does it show up?
posted by matthewr at 1:26 PM on June 6