additional script
From Project:Support desk
Hi Folks,
is there a way to add JS libraries to the ressourceloader or the html-header?
I tried several solutions:
- copy&paste in MediaWiki:Common.js
- write the <script src="ht .... in the skin
- and unsuccessful wuth '$out->addModuleScripts'
but is there a configuration variable or another "right way" to include jsfiles?
I'd like to use e.g. http://code.google.com/p/jquery-jsonp/
- Create a ResourceLoader module for 'jquery.jsonp'
- Create a ResourceLoader module for your script (e.g. 'myextension.foobar' that uses jquery-jsonp, and add 'jquery.json' as a dependency
- call
$out->addModules('myextension.foobar'). Which will instruct the client to load that module and any/all dependencies.
See also: