From 3e0b5459264a5c58e75d82ef547dfae4a415e88e Mon Sep 17 00:00:00 2001 From: TFWol <9045213+TFWol@users.noreply.github.com> Date: Wed, 3 Aug 2022 11:10:01 -0700 Subject: [PATCH 1/2] Fixed setting custom indicator and interval --- github-title-notification.user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/github-title-notification.user.js b/github-title-notification.user.js index 0f018b4..7e29db1 100644 --- a/github-title-notification.user.js +++ b/github-title-notification.user.js @@ -49,14 +49,14 @@ GM_registerMenuCommand("Set GitHub Title Notification Indicator", () => { const val = prompt("Indicator Value (it will be wrapped in parentheses)?", indicator); if (val !== null) { - GM_setValue("indicator", indicator); + GM_setValue("indicator", val); check(); } }); GM_registerMenuCommand("Set GitHub Title Notification Interval", () => { const val = prompt("Interval Value (in seconds)?", interval); if (val !== null) { - GM_setValue("interval", interval); + GM_setValue("interval", val); setTimer(); } }); From 71b0492b0aa6dd28c2b27f9fa528efbc332dc123 Mon Sep 17 00:00:00 2001 From: TFWol <9045213+TFWol@users.noreply.github.com> Date: Wed, 3 Aug 2022 11:27:41 -0700 Subject: [PATCH 2/2] Updated notification visibility logic From @Mottie Updated logic for notification to should show up. --- github-title-notification.user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github-title-notification.user.js b/github-title-notification.user.js index 7e29db1..1feaaf9 100644 --- a/github-title-notification.user.js +++ b/github-title-notification.user.js @@ -27,7 +27,7 @@ function check() { let title = document.title, mail = document.querySelector(".mail-status"), - hasUnread = mail ? mail.classList.contains("unread") : false; + hasUnread = mail ? !mail.hidden : false; // if (!/^\(\d+\)/.test(title)) { title = title.replace(/^(\([^)]+\)\s)*/g, "");