Hacker News new | ask | show | jobs
by raldi 4847 days ago
How does this work?
2 comments

Read the linked article. Email clients wrap the contents of forwarded messages in a <blockquote>, you just have to use CSS rules to hide the contents of a "blockquote yourfooterclasss" while otherwise showing yourfooterclass by default.

EDIT I actually meant "read the article linked from the linked article" — I too spent a good minute there trying to find out their solution.

I read the article, and the only mention of blockquotes was in the CSS / HTML itself. I don't see any mention in the article about how it works.

Still, thanks for the explanation. Does every mail client do this (like, due to an RFC) or just the popular ones?

It varies between mail clients, but they generally put the forwarded part of the message in either a blockquote or a div with a class that can be targeted. It's how the vertical blue line is produced for the quoted portion.
Read here: http://jonathan-kim.com/2011/programmatically-customizing-a-...

Basically most e-mail clients change the dom structure in some way when you forward an email (like wrapping the original in a div). Write some CSS rules that require an unmodified structure to show the unsubscribe button.

Darn, you found me!