Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export abstract class WebmailElementReplacer {
public abstract reinsertReplyBox: (replyMsgId: string) => void;
public abstract scrollToReplyBox: (replyMsgId: string) => void;
public abstract scrollToCursorInReplyBox: (replyMsgId: string, cursorOffsetTop: number) => void;
public abstract addSecureActionsToMessageMenu: () => void;

public runIntervalFunctionsPeriodically = () => {
const intervalFunctions = this.getIntervalFunctions();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,20 @@ export class GmailElementReplacer extends WebmailElementReplacer {
}
};

public addSecureActionsToMessageMenu = () => {
$(document).on('click', 'div.aHU.hx', event => {
const $actionsBtn = $(event.currentTarget).find(this.sel.msgActionsBtn);
if ($actionsBtn.length && !$('.action_menu_message_button').length) {
this.addMenuButton('reply', '#r');
this.addMenuButton('forward', '#r3');
}
});
};

private everything = () => {
this.replaceArmoredBlocks().catch(Catch.reportErr);
this.replaceAttachments().catch(Catch.reportErr);
this.replaceComposeDraftLinks();
this.replaceActionsMenu();
this.replaceConvoBtns();
this.replaceStandardReplyBox().catch(Catch.reportErr);
this.evaluateStandardComposeRecipients().catch(Catch.reportErr);
Expand Down Expand Up @@ -290,13 +299,6 @@ export class GmailElementReplacer extends WebmailElementReplacer {
);
};

private replaceActionsMenu = () => {
if ($('.action_menu_message_button').length <= 0) {
this.addMenuButton('reply', '#r');
this.addMenuButton('forward', '#r3');
}
};

private replaceConvoBtns = (force = false) => {
const convoUpperIconsContainer = $('div.hj:visible');
const convoUpperIcons = $('span.pYTkkf-JX-ank-Rtc0Jf');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export class GmailWebmailStartup {
const messageRenderer = await MessageRenderer.newInstance(acctEmail, new Gmail(acctEmail), relayManager, factory);
this.replacer = new GmailElementReplacer(factory, clientConfiguration, acctEmail, messageRenderer, injector, notifications, relayManager);
await notifications.showInitial(acctEmail);
this.replacer.addSecureActionsToMessageMenu();
this.replacer.runIntervalFunctionsPeriodically();
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export class ThunderbirdElementReplacer extends WebmailElementReplacer {
public reinsertReplyBox: (replyMsgId: string) => void;
public scrollToReplyBox: (replyMsgId: string) => void;
public scrollToCursorInReplyBox: (replyMsgId: string, cursorOffsetTop: number) => void;
public addSecureActionsToMessageMenu: () => void;
private emailBodyFromThunderbirdMail: string;

public getIntervalFunctions = (): IntervalFunction[] => {
Expand Down
Loading