Add JS snippets, just like CSS snippets

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.