From 8d166b314eab91d15bf0ca9701a8ba68b5c1ad56 Mon Sep 17 00:00:00 2001 From: Mic Date: Tue, 24 Mar 2026 00:14:00 +0100 Subject: [PATCH] delete and refresh buttons are now styled the same --- _locales/en/messages.json | 8 ++++++++ js/mzta-compose-script.js | 12 ++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 287ef765..a5fd03f1 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1992,6 +1992,14 @@ "message": "Refresh spam report", "description": "" }, + "spamfilter_delete": { + "message": "Delete spam report", + "description": "" + }, + "summarize_delete": { + "message": "Delete summary", + "description": "" + }, "antispam_by": { "message": "Antispam by", "description": "" diff --git a/js/mzta-compose-script.js b/js/mzta-compose-script.js index cd3e2812..c78721e9 100644 --- a/js/mzta-compose-script.js +++ b/js/mzta-compose-script.js @@ -716,8 +716,10 @@ switch (message.command) { const closeBtn = document.createElement('span'); closeBtn.textContent = '×'; - closeBtn.style.cssText = 'cursor: pointer; font-weight: bold; font-size: 16px; padding: 0 5px;'; - closeBtn.title = browser.i18n.getMessage("chatgpt_win_close"); + closeBtn.style.cssText = 'cursor: pointer; opacity: 0.6; font-size: 16px; padding: 0 5px; transition: opacity 0.2s;'; + closeBtn.title = browser.i18n.getMessage("spamfilter_delete"); + closeBtn.onmouseover = () => closeBtn.style.opacity = '1'; + closeBtn.onmouseout = () => closeBtn.style.opacity = '0.6'; closeBtn.onclick = function() { container.remove(); browser.runtime.sendMessage({ command: "removeSpamReport", headerMessageId: data.headerMessageId }); @@ -788,8 +790,10 @@ switch (message.command) { const summaryCloseBtn = document.createElement('span'); summaryCloseBtn.textContent = '×'; - summaryCloseBtn.style.cssText = 'cursor: pointer; font-weight: bold; font-size: 16px; padding: 0 5px;'; - summaryCloseBtn.title = browser.i18n.getMessage("chatgpt_win_close"); + summaryCloseBtn.style.cssText = 'cursor: pointer; opacity: 0.6; font-size: 16px; padding: 0 5px; transition: opacity 0.2s;'; + summaryCloseBtn.title = browser.i18n.getMessage("summarize_delete"); + summaryCloseBtn.onmouseover = () => summaryCloseBtn.style.opacity = '1'; + summaryCloseBtn.onmouseout = () => summaryCloseBtn.style.opacity = '0.6'; summaryCloseBtn.onclick = function() { summaryContainer.remove(); browser.runtime.sendMessage({ command: "removeSummary", headerMessageId: summaryData.headerMessageId });