Closed RealRaven2000 closed 2 weeks ago
While testing, I also encountered an interesting behavior of the %clipboard()%
function: It will preferably return html as format, so if we copy an email address from composer in the editing area, it will return a string like:
<html><body>
<!--StartFragment-->thunderbirddaily@gmail.com<!--EndFragment-->
</body>
</html>
so we will need a way of dealing with this, maybe by forcing plain text through a parameter. See new issue #330
Preview version:
this one supports using empty parentheses to return data without passing parameters, in order to get the result string %from%
like this:
var t = await from();
To install version above download zip file and drag the file into Thunderbird Add-ons Manager (do not extract contents, it won't install like that)
Implemented in 4.9 - published 11/11/2024
In the following example we try to read the %identity% variable and do something within the script:
Expected behavior: identity should retrieve the same string that %identity% would. The problem here is that the function isn't fully executed. Instead it returns an empty function or throws "ERR: TypeError: can't convert val to string ". The workaround would be to add parentheses, like this:
But this returns the string
%identity%
- because by design an empty parameter list was not allowed.As an acceptable workaround I tried supplying an empty string as argument, like this:
Interestingly, this returns an empty string at the moment. Let's implement this to work so that it returns the variable value like this: