$("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.
I can tell these are written really well because the voice that I hear in my head as I read them is your typical insincere Silicon Valleyite. Well done!
There's some weird formatting going on though. I might be using slightly old and lightweight e-mail client (M2 in Opera12), but I still don't think it should look like this http://puu.sh/fTYSp/c4f0a3bb84.png
Just slightly? This is what led me to believe at first that the site is meant to be humorous and not something serious.
Why not add a canned mail for "will you marry me?", "Your parents were involved in a crash" and "you have 6 months to live" ?
Also, if someone will send me an "Hey. How's it going?" canned mail, I can assure you they won't be hearing from me.
I admit I find it hard to fathom how someone would have such a lack of respect for their relationships with other people (and therefore, implicitly, lack of respect for themselves) that they would actually use this for personal communication.
Hi Placebo how's it going? I saw those pictures you posted on Facebook recently (omg that plate of food you were eating looked so delish!), they sure brightened up my day. They also reminded me it's been awhile since we've spoken and I miss catching up with you. We should plan to see each other in some future non-specific event, let me know when you think it's a good time and I'll send you my public Google calendar so you can check if I'm busy that day. I also want you to know how special your friendship is to me and that you should feel free to reach out to me with a direct message on Twitter at any time. Well placebo, I'm glad we had this talk, have a great day!
Still I don't know how to avoid that the annoying Apple mail program opens all the mails and not Gmail's compose view within in the browser. Thus, I'd also agree to just get a text preview from the text and maybe not just one version but many curated from users as a next feature.
It would be better if you set the body for each email with JavaScript and the new lines with "%0A" instead of the indented HTML code. Or don't use indented HTML code for the body blocks. The indented HTML code has also effect of the style of the email: the first line is normal, the second line and all following lines are indented with 25 spaces. This looks strange.
The email body seems to be prefixed with the following, which is showing in my webmail editor (Roundcube). Is it a problem with my configuration or this site?
<!-- html ignored --><!-- head ignored --><!-- meta ignored --><body><p>
It helps to understand that asking how someone is at the start of a conversation should generally be interpreted as a social convention rather than a literal question.
The socially correct response is either something like "fine", or to repeat the question. Note that if you're going to answer it as a question, the correct answer is always "fine" regardless of whether one really is fine; if you said something like "terrible" you'd be obliging a stranger to pry into your personal business. The fabric of society is very complex, as someone once said.
These are all valid in various dialects/registers of native English: