Category talk:Snippets with JavaScript

I have found a JavaScript snippet quite useful, but I'm missing a good advice where to put the code. Which file? And how do I save the change, when upgrading Mediawiki? --&#91;&#91;User:Bmrberlin&#124; Bernd M.&#93;&#93; (talk) 07:51, 15 April 2015 (UTC)
 * @Bmrberlin: the "user" module mentioned on the page is created from wiki pages such as Special:MyPage/common.js. Helder 14:00, 15 April 2015 (UTC)
 * @Helder Thank you, Helder. But such a page does not exist. What can I do, if the snippet should be istalled for the whole Wiki?--&#91;&#91;User:Bmrberlin&#124; Bernd M.&#93;&#93; (talk) 04:41, 16 April 2015 (UTC)
 * @Bmrberlin: if you have $wgUseSiteJs set to  you can use MediaWiki:Common.js to load the script for all users of the wiki (including anonymous users). Helder 17:34, 16 April 2015 (UTC)