title: add location.href to a script src
body: <p>I'm not a javascript pro, and I need to achieve a simple thing. How can I add the current browser URL to a script src tag?</p>
  
  <p>The end result should be: </p>
  
  <pre><code>&lt;script src="http://example.com/script.js?ref= {location.href} "&gt;&lt;/script&gt;
  </code></pre>