title: Load external page and insert Javascript?
body: <p>I am creating a website that need to load any page, for example Google.com, and insert some javascript to load with the page.</p>
  
  <p>Example: <a href="http://hsmaker.com/harlemshake.asp?url=http://stackoverflow.com" rel="nofollow">http://hsmaker.com/harlemshake.asp?url=http://stackoverflow.com</a>
  WARNING: May be annoying ;)</p>
  
  <p>Load the page and search for "harlem" and you'll see it adds this:</p>
  
  <pre><code>&lt;div style="position:absolute; z-index:9999999; width:100%; height:100%;" &gt;&lt;/div&gt;
      &lt;script src="http://hsmaker.com/harlem-shake-script.js" type="text/javascript"&gt;&lt;/script&gt;
      &lt;div style=" height:0px; width:0px; overflow:hidden;"&gt;
      &lt;audio controls="controls" autoplay="autoplay" loop="loop"&gt;
          &lt;source src="http://hsmaker.com/sound/harlemshake.ogg" type="audio/ogg" /&gt;
      &lt;/audio&gt;
      &lt;script type="text/javascript"&gt;
          ready(function () {
              harlemShake();
          });
      &lt;/script&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>As you can see, it loads the website (like if you went to the page) and it adds that code to it. I'm thinking about doing an iframe around the stuff, but as far as I know, you can't add javascript to iframe, so it's definately not how they do it.</p>
  
  <p>Thanks in advance</p>