$("h2 a").each(function(){
var email = decodeURIComponent(this.href).slice(13).split("&subject=");
var subject = email[1];
var body = email[0].replace(/\n( )+/g, "\n");
var parent = $(this).parent("h2")
parent.after($("<div />").text(body));
parent.after($("<h4 />").text(subject));
});
Whoops, you're right, console.log was supposed to be at the very bottom of the script. By default most browser consoles scroll you to the bottom of the output, so I just read the first half scrolling up and never noticed. No matter, amarraja's version is much better.