additional script

Jump to: navigation, search

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/

VanGore16:36, 25 January 2012
  • 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:

Krinkle02:49, 29 January 2012

thx ;)

VanGore10:46, 31 January 2012
 
 
Personal tools

Variants
Actions
Navigation
Support
Download
Development
Communication
Toolbox