Should be pretty doable, even if you don't have much JS knowledge yet. You might want to look into TamperMonkey for this, it's a sort of framework for making custom browser plugins!
TamperMonkey is closed source. I'd recommend ViolentMonkey instead, since it's open source and is practically identical to the other *Monkey extensions.
edit: To add, the developer of TamperMonkey has also shown themselves to be not worthy of trust; see Wikipedia under Controversy.
A malicious adware media player - not related to Tampermonkey - installed Tampermonkey on your device to do bad stuff. And they could have done the same with any other userscript extension, like the suggested Violentmonkey.
The wiki section even states:
This does not mean that Tampermonkey is malicious, but rather that a malicious program is utilizing a legitimate program for bad behavior
It's fine to advocate and promote open source software, but why do that with lies and slander?