I'm making a bookmarklet that scrapes a web page and construct a list of URLs that I want to be diplayed instead of the current web page. How to you create a temporary web page and viewing it in the browser?
This is what I've got so far:
var urls = myUrlScraper(window.location.pathname);
var tempPage = "<html>" + urls + "</html>";
window.location = tempPageUrl; // How to do this?
You could open a new window and write your HTML to it.
Something like:
var urls = myUrlScraper(window.location.pathname);
var tempPage = "<html>" + urls + "</html>";
var w = window.open('');
w.document.write(tempPage);