Hi @Chaboi_3000,
neat idea, we talked of something similar with @sam recently.
My main criticism is the code, it should be vastly improved, I can provide guidance if you are willing to improve it.
Few ways to improve it:
- indentation
- intervals should be cleared https://mdn.beonex.com/en/DOM/window.clearInterval.html
- you should look at how we can write themes with javascripts files now (eg: GitHub - discourse/discourse-group-timezones · GitHub)
- we don’t use var anymore, let/const
- equality in js should be checked with === and not ==
Let me know if you need more help, happy to review more.
I’m a little bit concerned we can’t disable it on per user basis, as I would never use this. But we don’t have per user setting in theme components ATM. So I don’t see any good/easy solution here.
Maybe a good solution would be to have a pair of groups/message, that would make it slightly more configurable.