Getting page content through javascript