[MlMt] Inject custom javascript into Message View

Padraic Renaghan prenagha at renaghan.com
Tue Jun 13 09:29:09 EDT 2017

Totally understand not wanting to enable javascript in the message view. Certainly can't trust senders to run javascript they provide.

Maybe there is another way to do what I am trying to accomplish...

My company adds a ridiculous 20 line legal footer to all emails. Makes reading them noisy, especially when a thread gets a few replies, and every reply gets another 20 legal footer. So I was going to use javascript to identify those blocks and "display:hide" them.

Is there another way to do that?
Any way to filter the message prior to loading it into the MM Web View?
Is that what the premailer is about?
Can I customize that?


2017-06-13 05:44 EDT from Benny Kjær Nielsen:

> On 12 Jun 2017, at 18:59, Padraic Renaghan wrote:
>> What I'd really like to do is inject javascript. I tried making my own version of basic.js, but that didn't seem to get injected.
> Javascript is currently always disabled for the message view.
>> I did it for headers with the headersFormatting.plist using the prefix. This seems to work well.
> The HTML generated for the headers view is under my control and therefore it is safer to allow Javascript.
>> Any way to do this for the main message view?
> Not currently.
>> If not, possible new advanced feature?
> Yes, but probably only for non-HTML emails and then I'm not sure it's really useful. I really don't want to go into the problem of sanitizing arbitrary HTML messages.
> -- 
> Benny
> _______________________________________________
> mailmate mailing list
> mailmate at lists.freron.com
> https://lists.freron.com/listinfo/mailmate
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3522 bytes
Desc: S/MIME digital signature
URL: <http://lists.freron.com/pipermail/mailmate/attachments/20170613/ea7e6a13/attachment-0001.bin>

More information about the mailmate mailing list