title: How do I insert a script tag in to the top/beginning of head tag?
body: <p>I want to insert a script tag before all the rest of the scripts in the head tag. How would I do that with native javascript?</p>
  
  <pre><code>&lt;head&gt;
      //INSERT SCRIPT HERE
       &lt;script type="text/javascript" src="common.js"&gt;&lt;/script&gt;
       &lt;script type="text/javascript" src="omni-controls.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  </code></pre>
  
  <p>When I use this, it just appends after all the tags in the head tag.</p>
  
  <pre><code>document.getElementsByTagName("head")[0].appendChild(script);
  </code></pre>