Mottie/GitHub-userscripts

Github Title Notification is broken

veksha opened this issue · 8 comments

it always shows heart even if there is no new notifications present.

TFWol commented

I'm having the same problem.
It seems to happen when I'm browsing a repo's Issues.

TFWol commented

@veksha
I was able to make a workaround.
Replace

hasUnread = mail ? mail.classList.contains("unread") : false;

with:

hasUnread = !mail.hasAttribute("hidden") ? true : false;

I got it working with

hasUnread = mail ? !mail.hidden : false;

Sorry, lots of personal stuff going on that I haven't had a chance to actually commit this fix.

TFWol commented

I got it working with

hasUnread = mail ? !mail.hidden : false;

Sorry, lots of personal stuff going on that I haven't had a chance to actually commit this fix.

No problem, I'm just glad you've made this amazing repo.

I didn't do a pull request because I knew you'd have a more eloquent way to fix it; I only dabble in JS 🙂

TFWol commented

Is it just me or is changing the notification indicator symbol not working?

yes, another bug.

TFWol commented

Oo, I see why.

Change:

GM_setValue("indicator", indicator);

To:

GM_setValue("indicator", val);

Then refresh page

---edit:
same for interval:

Change:

GM_setValue("interval", interval);

To:

GM_setValue("interval", val);

Nice. If you use Windows, press Win+. and you can use emojis :D
image

nice work, @TFWol ! thank you.