Add JS snippets, just like CSS snippets

Use case or problem

I would like to have an option to add simple JS snippets, much like using custom CSS snippets. My goal is to apply some non-trivial CSS hover logic that is not possible without attaching a class to a parent via JS.
But I assume, being able to run simple JS snippets when Obsidian loads would have plenty of use cases.

Proposed solution

Much like CSS snippets in Appearance > CSS snippets, there would be an option for JS snippets and a new folder .obsidian/js-snippets.

Current workaround (optional)

There are some plugins that allow using custom JS, but they add unnecessary complexity. I have not found one that would execute JS snippets on launch.

Related feature requests (optional)

PS: I did find this thread Add external javascript to support custom webcomponents and it actually lists a plugin “JavaScript Init” that does exactly that. It allows to load JS on Obsidian start.

CodeScript Toolkit?

I think Templater and QuickAdd can, too.

Note toolbar plugin is handy too.