@@ -148,6 +148,24 @@ export class GmailElementReplacer extends WebmailElementReplacer {
148148 }
149149 } ;
150150
151+ public addSecureActionsToMessageMenu = ( ) => {
152+ const retryInterval = 100 ;
153+ const addButtons = ( ) => {
154+ if ( ! $ ( this . sel . msgActionsBtn ) . length ) {
155+ Catch . setHandledTimeout ( addButtons , retryInterval ) ;
156+ } else {
157+ $ ( document ) . on ( 'click' , 'div.aHU.hx' , ( ) => {
158+ if ( ! $ ( '.action_menu_message_button' ) . length ) {
159+ this . addMenuButton ( 'a_reply' , '#r' ) ;
160+ this . addMenuButton ( 'a_reply_all' , '#r2' ) ;
161+ this . addMenuButton ( 'a_forward' , '#r3' ) ;
162+ }
163+ } ) ;
164+ }
165+ } ;
166+ addButtons ( ) ;
167+ } ;
168+
151169 private everything = ( ) => {
152170 this . replaceArmoredBlocks ( ) . catch ( Catch . reportErr ) ;
153171 this . replaceAttachments ( ) . catch ( Catch . reportErr ) ;
@@ -156,7 +174,6 @@ export class GmailElementReplacer extends WebmailElementReplacer {
156174 this . replaceStandardReplyBox ( ) . catch ( Catch . reportErr ) ;
157175 this . evaluateStandardComposeRecipients ( ) . catch ( Catch . reportErr ) ;
158176 this . addSettingsBtn ( ) ;
159- this . addSecureActionsToMessageMenu ( ) ;
160177 this . renderLocalDrafts ( ) . catch ( Catch . reportErr ) ;
161178 } ;
162179
@@ -878,18 +895,6 @@ export class GmailElementReplacer extends WebmailElementReplacer {
878895 }
879896 } ;
880897
881- private addSecureActionsToMessageMenu = ( ) => {
882- $ ( this . sel . msgActionsBtn )
883- . off ( 'click' )
884- . on ( 'click' , ( ) => {
885- if ( ! $ ( '.action_menu_message_button' ) . length ) {
886- this . addMenuButton ( 'a_reply' , '#r' ) ;
887- this . addMenuButton ( 'a_reply_all' , '#r2' ) ;
888- this . addMenuButton ( 'a_forward' , '#r3' ) ;
889- }
890- } ) ;
891- } ;
892-
893898 private renderLocalDrafts = async ( ) => {
894899 if ( window . location . hash === '#drafts' ) {
895900 const storage = await GlobalStore . get ( [ 'local_drafts' ] ) ;
0 commit comments