Skip to content
Merged
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
6 changes: 3 additions & 3 deletions github-title-notification.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, "");
Expand All @@ -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();
}
});
Expand Down