Programming, Topic: MutationObserver

All posts

Recent posts

Locking BGA tabs with UserScripts

I play a lot of games on Board Game Arena (BGA!). A lot of those are turn based games with random people, but I have two subsets of games that I consider ‘more important’:

  • Turn based games with people I know
  • Alpha games I’m testing

Unfortunately, the first tends to have longer ‘per turn’ times and the latter doesn’t have a timer at all, so both end up right at the very end of the sorted table list. But both, I’d rather play first and in-between other games.

Super niche problems, I know.

Generally, my solution has been to keep a tab open for each of those games in a Firefox Tab Group, but in those cases, I keep navigating off those pages accidentally (thank you next table button).

Super super niche problems, now.

In any case, I whipped up a quick userscript (I use ViolentMonkey) that will:

  • Detect if a tab I’m on is one of the games I want to ’lock’
  • Remove the next table button (buttons; there are two different ones)
  • Disable navigation (at least make it pop up a warning)
  • Periodically refresh the tab (BGA tends to go to sleep in the background)

read more...