File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
extension/js/content_scripts/webmail/thunderbird Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -25,10 +25,10 @@ export class ThunderbirdElementReplacer extends WebmailElementReplacer {
2525 private emailBodyFromThunderbirdMail : string ;
2626
2727 public getIntervalFunctions = ( ) : IntervalFunction [ ] => {
28- return [ { interval : 2000 , handler : ( ) => this . replaceThunderbirdMsgPane ( ) } ] ;
28+ return [ { interval : 2000 , handler : ( ) => this . handleThunderbirdMessageParsing ( ) } ] ;
2929 } ;
3030
31- public replaceThunderbirdMsgPane = async ( ) => {
31+ public handleThunderbirdMessageParsing = async ( ) => {
3232 const emailBodyToParse = $ ( 'div.moz-text-plain' ) . text ( ) . trim ( ) || $ ( 'div.moz-text-html' ) . text ( ) . trim ( ) ;
3333 if ( Catch . isThunderbirdMail ( ) ) {
3434 const pgpRegex = / - - - - - B E G I N P G P M E S S A G E - - - - - ( .* ?) - - - - - E N D P G P M E S S A G E - - - - - / s;
Original file line number Diff line number Diff line change @@ -19,7 +19,8 @@ export class ThunderbirdWebmailStartup {
1919
2020 private start = async ( ) => {
2121 this . replacer = new ThunderbirdElementReplacer ( ) ;
22- this . replacer . runIntervalFunctionsPeriodically ( ) ;
22+ // doesn't need hearbeat-like content replacer as the extension noticeably slows the Thunderbird client.
23+ await this . replacer . handleThunderbirdMessageParsing ( ) ;
2324 // todo: show notification using Thunderbird Notification as contentscript notification or such does not work.
2425 // await notifications.showInitial(acctEmail);
2526 // notifications.show(
You can’t perform that action at this time.
0 commit comments