title: Have to paste in console twice in order to get results? Also saying undefined is not a function?
body: <p>In the following code, if I paste it in console, I get the error <code>SyntaxError: Failed to execute 'querySelector' on 'Document': '[object HTMLDocument]' is not a valid selector.</code></p>
  
  <p>If I ignore the error and paste it again before refreshing the browser, the code goes through, returning the error <code>Uncaught TypeError: undefined is not a function</code></p>
  
  <p>Please help, this is my code, thanks!</p>
  
  <p>Also please note you have to be on the page to run it, which I am</p>
  
  <pre><code>(function(d,s){s=d.createElement('script');s.src='https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js';(d.head||d.documentElement).appendChild(s)})(document);
  $(document).ready(function() {
  var id = 158066137;
  var link = 'http://api.roblox.com/marketplace/productinfo?assetId=' + id;
  setInterval(function() {
      $.get(link, function(data) {
          var value = data;
          var isRobloxMade = value.indexOf('"Creator":{"Id":1,"Name":"ROBLOX"}');
          if (isRobloxMade &gt;= 0) {
              console.log(value);
          }
      });
  }, 10);
  });
  </code></pre>