Closed jtoddv closed 2 years ago
This is related to: #271 and #320
Try to add await
like this:
var editor = this.mWindow.gMsgCompose.editor;
var text = editor.outputToString('text/plain', 8);
return text;
const paragraph = await this.mQuicktext.get_script(["GetMailBody"]);
const regex = /Name:\s(.*?)\s/smi;
let found = paragraph.match(regex);
if (found == null) return "no match found"; // aditionally i would add a line like that
return found[1];
IMO close.
Thanks, Samuel! Worked.
Has worked for over a year, but today it seems to have stopped working. I see that the last update of the extension was on Sept 10th, 2022 (v5.2) running in Thunderbird 102.2.2 (64-bit).
I have a Quicktext script GetName that used str.match(regex) to parse out the name from a submitted email. This same script now errors out with the following:
Here is the code of the two functions used to get the name:
GetMailBody Script:
GetName Script:
Any help on why this stopped working would be appreciated.