GitHub-userscripts icon indicating copy to clipboard operation
GitHub-userscripts copied to clipboard

Github Title Notification is broken

Open veksha opened this issue 2 years ago • 8 comments

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

veksha avatar Jul 04 '22 02:07 veksha

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

TFWol avatar Aug 03 '22 02:08 TFWol

@veksha I was able to make a workaround. Replace https://github.com/Mottie/GitHub-userscripts/blob/bc9181cd5d17084aa9f226a0a7cfbb0cd4045c1f/github-title-notification.user.js#L30

with:

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

TFWol avatar Aug 03 '22 02:08 TFWol

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.

Mottie avatar Aug 03 '22 03:08 Mottie

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 avatar Aug 03 '22 07:08 TFWol

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

TFWol avatar Aug 03 '22 17:08 TFWol

yes, another bug.

veksha avatar Aug 03 '22 17:08 veksha

Oo, I see why.

Change: https://github.com/Mottie/GitHub-userscripts/blob/bc9181cd5d17084aa9f226a0a7cfbb0cd4045c1f/github-title-notification.user.js#L52

To:

GM_setValue("indicator", val);

Then refresh page

---edit: same for interval:

Change: https://github.com/Mottie/GitHub-userscripts/blob/bc9181cd5d17084aa9f226a0a7cfbb0cd4045c1f/github-title-notification.user.js#L59

To:

GM_setValue("interval", val);

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

TFWol avatar Aug 03 '22 17:08 TFWol

nice work, @TFWol ! thank you.

veksha avatar Aug 03 '22 19:08 veksha