diff --git a/calendar/base/content/dialogs/calendar-event-dialog-reminder.js b/calendar/base/content/dialogs/calendar-event-dialog-reminder.js index b12839b667..36667386eb 100644 --- a/calendar/base/content/dialogs/calendar-event-dialog-reminder.js +++ b/calendar/base/content/dialogs/calendar-event-dialog-reminder.js @@ -192,13 +192,7 @@ function setupMaxReminders() { null, gReminderNotification.PRIORITY_WARNING_MEDIUM ); - - if (gReminderNotification.gProton) { - notification.closeButton.hidden = true; - } else { - let closeButton = notification.messageDetails.nextElementSibling; - closeButton.setAttribute("hidden", "true"); - } + notification.closeButton.hidden = true; } else { gReminderNotification.removeAllNotifications(); } diff --git a/mail/base/content/mailWindowOverlay.js b/mail/base/content/mailWindowOverlay.js index 0da30b7642..faac5789db 100644 --- a/mail/base/content/mailWindowOverlay.js +++ b/mail/base/content/mailWindowOverlay.js @@ -3351,16 +3351,9 @@ var gMessageNotificationBar = { aCanOverride ? buttons : [] ); - // Update the button differently based on the Proton pref. - if (this.msgNotificationBar.gProton) { - notification.buttonContainer.firstElementChild.classList.add( - "button-menu-list" - ); - return; - } - - let button = notification.spacer.nextElementSibling; - button.classList.add("button-menu-list"); + notification.buttonContainer.firstElementChild.classList.add( + "button-menu-list" + ); } }, @@ -3400,16 +3393,9 @@ var gMessageNotificationBar = { buttons ); - // Update the button differently based on the Proton pref. - if (this.msgNotificationBar.gProton) { - notification.buttonContainer.firstElementChild.classList.add( - "button-menu-list" - ); - return; - } - - let button = notification.spacer.nextElementSibling; - button.classList.add("button-menu-list"); + notification.buttonContainer.firstElementChild.classList.add( + "button-menu-list" + ); } }, diff --git a/mail/components/accountcreation/content/accountSetup.js b/mail/components/accountcreation/content/accountSetup.js index 3062b48b31..a1ff897cda 100644 --- a/mail/components/accountcreation/content/accountSetup.js +++ b/mail/components/accountcreation/content/accountSetup.js @@ -792,12 +792,7 @@ var gAccountSetup = { notification.setAttribute("align", "center"); // Hide the close button to prevent dismissing the notification. - if (this.notificationBox.gProton) { - notification.removeAttribute("dismissable"); - } else { - let closeButton = notification.messageDetails.nextElementSibling; - closeButton.hidden = true; - } + notification.removeAttribute("dismissable"); this.ensureVisibleNotification(); }, @@ -839,12 +834,7 @@ var gAccountSetup = { notification.setAttribute("type", "success"); // Hide the close button to prevent dismissing the notification. - if (this.notificationBox.gProton) { - notification.removeAttribute("dismissable"); - } else { - let closeButton = notification.messageDetails.nextElementSibling; - closeButton.hidden = true; - } + notification.removeAttribute("dismissable"); this.showHelperImage("step3"); @@ -891,12 +881,7 @@ var gAccountSetup = { ); // Hide the close button to prevent dismissing the notification. - if (this.notificationBox.gProton) { - notification.removeAttribute("dismissable"); - } else { - let closeButton = notification.messageDetails.nextElementSibling; - closeButton.hidden = true; - } + notification.removeAttribute("dismissable"); this.ensureVisibleNotification(); }, @@ -1900,12 +1885,7 @@ var gAccountSetup = { ); // Hide the close button to prevent dismissing the notification. - if (this.notificationBox.gProton) { - notification.removeAttribute("dismissable"); - } else { - let closeButton = notification.messageDetails.nextElementSibling; - closeButton.hidden = true; - } + notification.removeAttribute("dismissable"); } }, diff --git a/mail/components/compose/content/MsgComposeCommands.js b/mail/components/compose/content/MsgComposeCommands.js index 4a0ed7fa76..c29de37fbb 100644 --- a/mail/components/compose/content/MsgComposeCommands.js +++ b/mail/components/compose/content/MsgComposeCommands.js @@ -2841,13 +2841,13 @@ function manageAttachmentNotification(aForce = false) { // specific keywords to the existing notification instead of creating it // from scratch. if (notification) { - let selector = this.gComposeNotification.gProton - ? notification.messageText - : notification; - - let msgContainer = selector.querySelector("#attachmentReminderText"); + let msgContainer = notification.messageText.querySelector( + "#attachmentReminderText" + ); msgContainer.setAttribute("value", textValue); - let keywordsContainer = selector.querySelector("#attachmentKeywords"); + let keywordsContainer = notification.messageText.querySelector( + "#attachmentKeywords" + ); keywordsContainer.setAttribute("value", keywords); return; } @@ -2913,19 +2913,10 @@ function manageAttachmentNotification(aForce = false) { ); notification.setAttribute("id", "attachmentNotificationBox"); - // Variation for Proton UI. - if (this.gComposeNotification.gProton) { - notification.messageText.appendChild(msg); - notification.buttonContainer.lastElementChild.appendChild( - remindLaterMenuPopup - ); - return; - } - - notification.messageDetails.querySelector("button").before(msg); - notification.messageDetails - .querySelector("button:last-child") - .appendChild(remindLaterMenuPopup); + notification.messageText.appendChild(msg); + notification.buttonContainer.lastElementChild.appendChild( + remindLaterMenuPopup + ); } /** @@ -5148,10 +5139,9 @@ function checkPublicRecipientsLimit() { // Reuse the existing notification since one is shown already. if (notification) { - let root = this.gComposeNotification.gProton - ? notification.messageText - : notification; - let msgText = root.querySelector(".consider-bcc-notification-text"); + let msgText = notification.messageText.querySelector( + ".consider-bcc-notification-text" + ); msgText.setAttribute( "data-l10n-args", JSON.stringify({ count: publicAddressPillsCount }) @@ -5211,17 +5201,7 @@ function checkPublicRecipientsLimit() { } ); notification.setAttribute("id", "warnPublicRecipientsNotification"); - // Variation for Proton UI. - if (this.gComposeNotification.gProton) { - notification.messageText.appendChild(msgText); - return; - } - - // Ugh, the following isn't perfect... but !gProton may be dropped soon. - let msg = document.createElement("div"); - msg.appendChild(msgText); - notification.messageDetails.style.display = "flex"; - notification.messageDetails.querySelector("button").before(msg); + notification.messageText.appendChild(msgText); } /**