title: js hook on html load process in browser
body: <p>Imagine I have following html with many items:</p>
  
  <pre><code>&lt;html&gt;&lt;body&gt;
      &lt;img src=http://host.com/pic1.jpg&gt;
      &lt;img src=http://host.com/pic1.jpg&gt;
      &lt;img src=http://host.com/pic1.jpg&gt;
  &lt;/html&gt;&lt;/body&gt;
  </code></pre>
  
  <p>Site owner adds some script to the page <strong>without other modifications</strong>:</p>
  
  <pre><code>&lt;script&gt;
    var some_super_function = ... // what can i put here?
    some_super_function('host.com','ghost.com');
  &lt;/script&gt;
  </code></pre>
  
  <p>and during loading of this html, host.com is replaced with hgost.com, so images are loaded from another server, <strong>as if</strong> the urls were:</p>
  
  <pre><code>&lt;html&gt;&lt;body&gt;
  &lt;img src=http://ghost.com/pic1.jpg&gt;
  &lt;img src=http://ghost.com/pic1.jpg&gt;
  &lt;img src=http://ghost.com/pic1.jpg&gt;
  &lt;/html&gt;&lt;/body&gt;
  </code></pre>
  
  <p>I guess selecting <code>$('img')</code> and tuning <code>.attr()</code> is not a good idea, because this may work only after page has loaded and I don't want the browser to reference host.com at all.</p>
  
  <p>I guess angularJS is doing something like that, isn't it?</p>
  
  <p>Is this possible?</p>
  
  <p>Thanks.</p>