Skip to content

Commit bd60c6d

Browse files
committed
Merge remote-tracking branch 'origin/master' into issue-5905-add-secure-reply-all-to-gmail-context-menu
2 parents 2a457f7 + 974502c commit bd60c6d

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

extension/js/content_scripts/webmail/generic/webmail-element-replacer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export abstract class WebmailElementReplacer {
1414
public abstract reinsertReplyBox: (replyMsgId: string) => void;
1515
public abstract scrollToReplyBox: (replyMsgId: string) => void;
1616
public abstract scrollToCursorInReplyBox: (replyMsgId: string, cursorOffsetTop: number) => void;
17+
public abstract addSecureActionsToMessageMenu: () => void;
1718

1819
public runIntervalFunctionsPeriodically = () => {
1920
const intervalFunctions = this.getIntervalFunctions();

extension/js/content_scripts/webmail/gmail/gmail-element-replacer.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,20 @@ export class GmailElementReplacer extends WebmailElementReplacer {
147147
}
148148
};
149149

150+
public addSecureActionsToMessageMenu = () => {
151+
$(document).on('click', 'div.aHU.hx', event => {
152+
const $actionsBtn = $(event.currentTarget).find(this.sel.msgActionsBtn);
153+
if ($actionsBtn.length && !$('.action_menu_message_button').length) {
154+
this.addMenuButton('reply', '#r');
155+
this.addMenuButton('forward', '#r3');
156+
}
157+
});
158+
};
159+
150160
private everything = () => {
151161
this.replaceArmoredBlocks().catch(Catch.reportErr);
152162
this.replaceAttachments().catch(Catch.reportErr);
153163
this.replaceComposeDraftLinks();
154-
this.replaceActionsMenu();
155164
this.replaceConvoBtns();
156165
this.replaceStandardReplyBox().catch(Catch.reportErr);
157166
this.evaluateStandardComposeRecipients().catch(Catch.reportErr);

extension/js/content_scripts/webmail/gmail/gmail-webmail-startup.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export class GmailWebmailStartup {
4545
const messageRenderer = await MessageRenderer.newInstance(acctEmail, new Gmail(acctEmail), relayManager, factory);
4646
this.replacer = new GmailElementReplacer(factory, clientConfiguration, acctEmail, messageRenderer, injector, notifications, relayManager);
4747
await notifications.showInitial(acctEmail);
48+
this.replacer.addSecureActionsToMessageMenu();
4849
this.replacer.runIntervalFunctionsPeriodically();
4950
};
5051

extension/js/content_scripts/webmail/thunderbird/thunderbird-element-replacer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export class ThunderbirdElementReplacer extends WebmailElementReplacer {
1919
public reinsertReplyBox: (replyMsgId: string) => void;
2020
public scrollToReplyBox: (replyMsgId: string) => void;
2121
public scrollToCursorInReplyBox: (replyMsgId: string, cursorOffsetTop: number) => void;
22+
public addSecureActionsToMessageMenu: () => void;
2223
private emailBodyFromThunderbirdMail: string;
2324

2425
public getIntervalFunctions = (): IntervalFunction[] => {

0 commit comments

Comments
 (0)