Firefox & Chrome addon: TWHL Shoutbox Notifications Created 6 months ago2018-06-02 17:59:45 UTC by potatis_invalid potatis_invalid

Created 6 months ago2018-06-02 17:59:45 UTC by potatis_invalid potatis_invalid

Posted 6 months 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
potatis_invalid potatis_invalidh̲͚̤̿͑̔̒̃̉̓ȋ͂͋̉̿̎͋̈́͏͚͖͇̭̩͓͔͝
Posted 6 months 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 6 months 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).
potatis_invalid potatis_invalidh̲͚̤̿͑̔̒̃̉̓ȋ͂͋̉̿̎͋̈́͏͚͖͇̭̩͓͔͝
Posted 6 months 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
potatis_invalid potatis_invalidh̲͚̤̿͑̔̒̃̉̓ȋ͂͋̉̿̎͋̈́͏͚͖͇̭̩͓͔͝
Posted 6 months 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 JessieLadytype
Posted 6 months 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.
potatis_invalid potatis_invalidh̲͚̤̿͑̔̒̃̉̓ȋ͂͋̉̿̎͋̈́͏͚͖͇̭̩͓͔͝
Posted 6 months 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 JessieLadytype
Posted 6 months 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 6 months 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.
potatis_invalid potatis_invalidh̲͚̤̿͑̔̒̃̉̓ȋ͂͋̉̿̎͋̈́͏͚͖͇̭̩͓͔͝
Posted 6 months ago2018-06-08 13:53:50 UTC Post #339831
That wasn't me. I forget who it was.
Jessie JessieLadytype
Posted 6 months ago2018-06-08 14:39:43 UTC Post #339832
Seriously? I'm sorry! I have the memory of a jellyfish. It was TJB
potatis_invalid potatis_invalidh̲͚̤̿͑̔̒̃̉̓ȋ͂͋̉̿̎͋̈́͏͚͖͇̭̩͓͔͝
Posted 4 months 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.
potatis_invalid potatis_invalidh̲͚̤̿͑̔̒̃̉̓ȋ͂͋̉̿̎͋̈́͏͚͖͇̭̩͓͔͝
You must be logged in to post a response.