Customizing relay browser chat


New member
It occurred to me last night while having a long PM conversation how nice it would be PM conversations weren't just a wall of blue. It gets hard to parse and it's annoying on my eyes. Honestly, with the advent of tabs, I see no reason for PM chat to be a different color at all.

This got me wondering: is there a way to change the colors of chat in the relay browser via KoLMafia? I'm curious to try making something myself if it is possible.


Staff member
I posted this some years back:

Note that the crimbogrotto link is dead (web archive link), but you should still be able to browse the code on sourceforge and install it if you really want to use it.

I have not touched it in many years, but I believe it still works. It loads various modules as a way to override bits of mchat.php ("modern chat" I believe). It's not super well documented, but there are a few arrays you can add JS hooks:
  • rawHooks mutate the entire response.msgs object.
  • filterHooks return booleans to decide whether to show a message or not.
  • messageHooks are called as a post-processing step on individual formatted messages.