title: How to get a Greasemonkey script to run both at @run-at document-start AND at @run-at document-end?
body: <p>For my Greasemonkey script, there is part of the code that should run before the page is loaded (<code>@run-at document-start</code>) and another part of the code that should run after the document is loaded (<code>@run-at document-end</code>).<br>
  Is this possible?</p>
  
  <ul>
  <li>1st part of script run</li>
  <li>page is loaded, document is ready</li>
  <li>2nd part of script run</li>
  </ul>
  
  <p>I'd rather not use jQuery for this.</p>
  
  <p>I tried the <code>onload</code> event but it didn't work. I think the event cannot be attached if the document is not there yet?</p>
  
  <pre><code>window.document.onload = function(e){ 
      alert("document.onload" ); 
  }
  </code></pre>