JavaScript to pull html from a page and process it