jobisoft / quicktext

An extension for Thunderbird that lets you create templates that can be easily inserted into your own emails.
Mozilla Public License 2.0
188 stars 53 forks source link

Changing the ATT display (changing the attached file name format) #401

Closed Malin8086 closed 8 months ago

Malin8086 commented 8 months ago

Hello. I don't know anything about programming, but I would like someone to help me create a script that will change the displayed file name as follows. Original name: "Xx 02_02_2022.pdf" Changed name: "02/02/2022" I am currently using the ATT variable. Is it possible to change the way it is displayed as I wrote above? I will be grateful for any help, best regards.

Malin8086 commented 8 months ago

I answered myself, wonderful community support, thank you very much :)

{
var atts = this.mQuicktext.get_att(["name"]);
var atts = atts.substring(3, atts.length - 4);
atts = atts.replace(/_/g, "/");
return atts;
}