Styling of status bar?

What I’m trying to do

I want to change the color of the backlink information in the statusbar depending on the number of backlinks. Basically I want to set it to one color if no backlinks exists and to another for all numbers > 0.

Things I have tried

I know how to apply custom styling to Obsidian. Nevertheless this case is tricky as the classes of the UI element don’t change based on the content. In web development I would solve this by using a little JS snippet. But for this case I’m not sure how to run just a small snippet in every page.

Is this possible or would I have to add some kind of magic snippet to each page manually?

Thanks.