I'm using Mozilla Firefox's console to run some JavaScript on blog to make an organized dump of the posts on it, and store it as a string variable. The string contains about 5000 messages, so it is quite long. I want to somehow save this string on my computer; this part may be done outside using methods outside of JavaScript.

The following options come to mind:

Save the string as a txt file. Save the contents of the string to the clipboard, paste it in Notepad, then save it. Use the console's output and copy it from there. Show an alert, then copy it from there. Create a new HTML page with the string as the body and show it in a new window, then copy it from there.

However, I don't know how to do 1 and 2 in JavaScript, the string is too long for options 3 and 4 (3 complains about the string being too large when I expand it, 4 gets truncated), and I don't know how to do 5.

Any suggestions? Thank you in advance.