Template:Snippets with JavaScript header

How to use
You can use these snippets in any resource loader module. Those generated by core (such as the site and user module generated from wiki pages) or in an extensions.