Live data from Hacker News

Canned Emails – a minimal site with prewritten emails

cannedemails.com

21–30 of 39 posts

Re: Canned Emails – a minimal site with prewritten emails

#24
post #6

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.

While on Gmail, in e.g. Chrome, look in the address bar for a symbol like and click it. More info: https://support.google.com/chrome/answer/1382847?hl=en

Thanks! this works!

Re: Canned Emails – a minimal site with prewritten emails

#25
post #9

Today I contributed to the greater good of society: var output = ""; $('h2 a').each(function(i) { output += "TITLE: " + $.trim(this.innerHTML) + "\n"; var email = decodeURIComponent(this.href).slice(13).split("&subject="); output += "SUBJECT: " + email[1] + "\n"; output += "BODY:\n" + email[0].replace(/\n( )+/g, "\n") + "\n\n\n\n"; console.log(output); }); That being said I love the site :)

   console.log(output); 
needs to be last line outside each() :) Or move var content = "" inside each()

Re: Canned Emails – a minimal site with prewritten emails

#26
post #19

Wow, so much potential. 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

same with Mail.app on OSX 10.10

Re: Canned Emails – a minimal site with prewritten emails

#27
post #9

Today I contributed to the greater good of society: var output = ""; $('h2 a').each(function(i) { output += "TITLE: " + $.trim(this.innerHTML) + "\n"; var email = decodeURIComponent(this.href).slice(13).split("&subject="); output += "SUBJECT: " + email[1] + "\n"; output += "BODY:\n" + email[0].replace(/\n( )+/g, "\n") + "\n\n\n\n"; console.log(output); }); That being said I love the site :)

Slightly tweaked your script to display inline

    $("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($("").text(body));
       parent.after($("").text(subject));
    });
Post reply on HN