I have a file, "all.js", that I want to include in every page. I'm wondering:
1. Where is the best place to do this?
2. How do I make sure that the mediawiki object (mw) is available?
Cheers!
I have a file, "all.js", that I want to include in every page. I'm wondering:
1. Where is the best place to do this?
2. How do I make sure that the mediawiki object (mw) is available?
Cheers!
It depends:
See Snippets/Load an additional JavaScript or stylesheet file on all pages. If you use this or MediaWiki:Common.js, etc, mw and jQuery should be available.