[Greasemonkey] getting all of web page into a string

Bill Donnelly donnelly at snowcrest.net
Tue May 2 03:26:00 EDT 2006


I didn't know about that one. Here's what I was talking about:

I've also seen this:

var headContents = window.document.getElementsByTagName("head")[0].innerHTML
var bodyContents = window.document.getElementsByTagName("body")[0].innerHTML

And I just tried this and it gives you everything between <html> and </html>

var htmlContents = window.document.getElementsByTagName("html")[0].innerHTML



More information about the Greasemonkey mailing list