TB-throwback / LookOut-fix-version

Fork of LookOut (fix version)
51 stars 17 forks source link

Replace message body with body_part_0.html when included #35

Open dugite-code opened 5 years ago

dugite-code commented 5 years ago

Modern versions of outlook will write in html and include this in the winmail.dat file. If pressent it would be nice to be able to replace the plain body text with this html.

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"><meta name="Generator" content="Microsoft Word 14 (filtered medium)">
dugite-code commented 1 year ago

With the WIP for TB 115 in #102 it looks to be reasonably simple to implement this by passing the html text to a js we can embed into the window as per: https://github.com/dgileadi/thunderbird-render-markdown/tree/master.

https://webextension-api.thunderbird.net/en/stable/messageDisplayScripts.html

Another example: https://github.com/matthias-g/smileyfixer/blob/master/scripts/background.js#L51C26-L51C55

It may also be possible to just use an experiment to update the message body

jobisoft commented 1 year ago

Message display script is the way to go!