title: Web Scraping in a Google Chrome Extension (JavaScript + Chrome APIs)
body: <p>What are the best options for performing <strong>Web Scraping of a not currently open tab from within a Google Chrome Extension</strong> with JavaScript and whatever more technologies are available. <strong>Other JavaScript-libraries are also accepted.</strong></p>
  
  <p><strong>The important thing is to mask the scraping to behave like a normal web-request</strong>. No indications of AJAX or XMLHttpRequest, like <code>X-Requested-With: XMLHttpRequest</code> or <code>Origin</code>.</p>
  
  <p>The scraped content must be accessible from JavaScript for further manipulation and presentation within the extension, most probably as a string.</p>
  
  <p>Are there any hooks in any WebKit/Chrome-specific API:s that can be used to make a normal web-request and get the results for manipulation?</p>
  
  <pre><code>var pageContent = getPageContent(url); // TODO: Implement
  var items = $(pageContent).find('.item');
  // Display items with further selections
  </code></pre>
  
  <p><strong><em>Bonus-points to make this work from a local file on disk</em></strong>, for initial debugging. But if that is the only point is stopping a solution, then disregard the bonus-points.</p>