2 * js2 style replacement for mediaWiki edit.js
4 //setup configuration vars:
6 var mwAddMediaConfig
= {
7 'profile':'mediawiki_edit',
8 'target_textbox': '#wpTextbox1',
9 //note selections in the textbox will take over the default query
10 'default_query': wgTitle
,
11 'target_title':wgPageName
,
12 //here we can setup the conten provider overides
15 //the local wiki api url:
16 'local_wiki_api_url': wgServer
+ wgScriptPath
+ '/api.php'
20 js2AddOnloadHook( function(){
21 mwEditPageHelper
.init();
23 var mwEditPageHelper
= {
26 //@@todo check for new version of toolbar and via toolbar api:
28 //add the add-media-wizard button for old toolbar:
29 $j('#toolbar').append('<img style="cursor:pointer" id="btn-add-media-wiz" src="' + mv_skin_img_path
+ 'Button_add_media.png">');
30 $j('#btn-add-media-wiz').addMediaWiz(
34 //add to new toolbar (need to use api)
35 /*$j('[rel=insert] tool-file').addMediaWiz(