Firefox & Chrome addon: TWHL Shoutbox Notifications Created 5 years ago2018-06-02 17:59:45 UTC by Oskar Potatis Oskar Potatis

Created 5 years ago2018-06-02 17:59:45 UTC by Oskar Potatis Oskar Potatis

Posted 5 years ago2018-06-02 17:59:45 UTC Post #339774
Would you like your web browser to alert you when someone shouts in TWHL's shoutbox, even when you're not on TWHL? I created a browser extension for that purpose.
Firefox version
Chrome version
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-06-02 22:45:14 UTC Post #339777
That's really neat! A few suggestions:
  • Don't pop up for my own shouts
  • Use the user's avatar in the notification instead of the generic lambda icon
Penguinboy PenguinboyHaha, I died again!
Posted 5 years ago2018-06-02 22:51:37 UTC Post #339778
Those are good suggestions. I thought about the first one, but though it might require too much work to create an UI. After a quick Googling, I've changed my mind - it seems pretty easy to create a settings UI. Using the user's avatar in the notification is something I hadn't considered. I'll get to it!

Edit: An update has been released containing implementations of Penguinboy's suggestions. If you want your shouts to be ignored, you have to go to the Extensions control panel and use the extension options panel to enter your username (Chrome: More tools > Extensions > TWHL Shoutbox Notifications > DETAILS > Extension options) (Firefox: Ctrl+Shift+A > Extensions > TWHL Shoutbox Notifications > Options).
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-06-03 14:28:43 UTC Post #339792
New version uploaded, should be available within a few minutes.
Changes:
  • No longer displays shouts older than two hours (configurable) on startup
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-06-03 23:37:05 UTC Post #339801
I guess I don't know the mechanics of how the notifications are handled, but I have a couple of suggestions:
  • Put some kind of prominent TWHL heading in there so it's clear the notification is regarding TWHL
  • When starting the browser, maybe have it just bring up a single notification saying how many shouts have been made since you last checked, rather than bringing up all the shouts one-by-one. Let's face it, once it isn't actively live, how handy is it seeing individual shouts? I think this would make a nice middle-ground between being bombarded by every shout between sessions and having shouts slip past the two-hour window (especially since two hours could also bombard you).
  • Maybe give an option to suppress avatars, re: your "I hope nobody decides to use a swastika avatar" comment. Maybe just as a safe-for-work insurance.
I literally have never turned on notifications for anything else here on my Firefox, for context.
Jessie JessieTrans Rights <3
Posted 5 years ago2018-06-04 00:17:15 UTC Post #339802
Thanks for your suggestions. The actual notification system is built into the browsers, so I'm limited in what I can do.

Concerning the heading, I could prefix the title with "TWHL: ". Would that be an okay solution?
Concerning your second point, I think that that is excellent idea and it shouldn't be too difficult to implement.
Concerning your third point, I'm not sure if it's worth the effort because I doubt that users would install the extensions in strict SFW environments. But I'll give it more consideration when I have more free time or if one more person asks for it.

Note to self: "They seem to show up most of the time after I close a YouTube video from fullscreen, that might be the cause of it." <- see what I can do about that

Edit: Implemented point 1 and also, whenever there are 5 or more new shouts, you get just one notification.
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-06-08 05:55:44 UTC Post #339828
I've seen the same "7 people have shouted" notification the last 4 or 5 times I've opened up Firefox. Is it just pulling that number from when I last shouted?
Jessie JessieTrans Rights <3
Posted 5 years ago2018-06-08 08:14:51 UTC Post #339829
The same is happening for me. It looks like you have a bug in your code, I think you need to put the first statement underneath the next two:
let { lastId, lastCreationTime, username, maxAge } = await storageGet(
	{"lastId": 0, "lastCreationTime": "0001-01-01 00:00:00", "username": "", "maxAge": "02:00:00"}
);
lastId=0;
lastCreationTime = "0000-01-01 00:00:00";
Or maybe even remove the last two lines altogether, since you get the defaults from the storageGet function.
Penguinboy PenguinboyHaha, I died again!
Posted 5 years ago2018-06-08 11:04:03 UTC Post #339830
I thought I removed those lines. Never release when you're in a hurry...

Edit:
A new, fixed version was uploaded an hour ago.
@Jessie, I haven't been able to recreate your full-screen problems on either Firefox or Chrome.
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-06-08 13:53:50 UTC Post #339831
That wasn't me. I forget who it was.
Jessie JessieTrans Rights <3
Posted 5 years ago2018-06-08 14:39:43 UTC Post #339832
Seriously? I'm sorry! I have the memory of a jellyfish. It was TJB
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-07-20 14:05:20 UTC Post #340208
A new version has been published and it should be rolling out to your browser within 24h. Here are the changes:
  • Using this extension no longer keeps your account on the top of the active users list (added request header X-Requested-With: XMLHttpRequest)
  • Earlier limit of 4 shouts reduced to 2.
  • Some changes to the timing of requests. Should be a little friendlier to the server (and your connection if you're on modem or on mobile or maybe just a Canadian polar bear) when there hasn't been activity in a while.
Oskar Potatis Oskar Potatis🦔
Posted 4 years ago2019-06-01 22:05:24 UTC Post #342680
I'm curious to know if anyone (other than me) is still using this, and if anyone stopped using it and if so why
Oskar Potatis Oskar Potatis🦔
Posted 4 years ago2019-06-02 00:47:28 UTC Post #342682
I'm still using it! I wouldn't be too upset if it stopped existing, but it's neat.
Penguinboy PenguinboyHaha, I died again!
Posted 4 years ago2019-06-02 01:07:53 UTC Post #342683
Great! I have no thoughts of taking it down, I'm just curious :)
Oskar Potatis Oskar Potatis🦔
Posted 4 years ago2019-07-25 15:49:07 UTC Post #342912
I just found this and it's awesome
Posted 4 years ago2019-07-27 20:59:47 UTC Post #342918
I completely missed this as well. Grabbed it immediately. :D
monster_urby monster_urbyGoldsourcerer
Posted 4 years ago2019-07-27 23:21:19 UTC Post #342920
Glad to hear it, you two 🙂
Oskar Potatis Oskar Potatis🦔
Posted 3 years ago2020-11-22 00:57:51 UTC Post #344920
Looks like the extension was broken by an API change. I've released a fix, but it could take a couple of weeks to clear Chrome's code reviews.
Oskar Potatis Oskar Potatis🦔
Posted 3 years ago2020-11-22 19:38:38 UTC Post #344932
How long ago did that happen do you think? I just noticed a few weeks ago that I still had the extension, I'd assumed it had been removed or something because I hadn't seen a notification for a long time.
Alabastor_Twob Alabastor_Twobformerly TJB
Posted 3 years ago2020-11-23 03:01:19 UTC Post #344937
Weeks, maybe even a few months would be my guess (whenever the format of dates in TWHL's API changed). I have been distracted so I didn't investigate before now
Oskar Potatis Oskar Potatis🦔
You must be logged in to post a response.