encapsulate javascript code in a function like mw does it
Merge pull request #57 from Wikidata-lib/update_js

encapsulate javascript code in a function like mw does it