Index: trunk/extensions/MetavidWiki/skins/add_media_wizard.js |
— | — | @@ -7,8 +7,12 @@ |
8 | 8 | var wg_local_wiki_api_url = wgServer + wgScriptPath + '/api.php'; |
9 | 9 | |
10 | 10 | //if mv_embed is hosted somewhere other than near by the add_media_wizard you can define it here: |
11 | | -var mv_add_media_wizard_path = 'http://mvbox2.cse.ucsc.edu/w/extensions/MetavidWiki/skins/'; |
| 11 | +var force_mv_add_media_wizard_path=false; |
| 12 | +//var force_mv_add_media_wizard_path = 'http://metavid.org/w/extensions/MetavidWiki/skins/'; |
12 | 13 | |
| 14 | +var force_mv_embed_path = false; |
| 15 | +//var force_mv_embed_path = 'http://metavid.org/w/extensions/MetavidWiki/skins/mv_embed/mvwScriptLoader.php?class=mv_embed'; |
| 16 | + |
13 | 17 | var MV_EMBED_VIDEO_HANDLER = true; // if we should use mv_embed for all ogg_hanlder video embeds. |
14 | 18 | |
15 | 19 | if( MV_EMBED_VIDEO_HANDLER ){ |
— | — | @@ -148,7 +152,11 @@ |
149 | 153 | //inject mv_embed if needed: |
150 | 154 | if( typeof mvEmbed == 'undefined'){ |
151 | 155 | //get mv_embed path from _this_ file location: |
152 | | - var mv_embed_url = getAddMediaPath( 'mv_embed/mv_embed.js' ); |
| 156 | + if( force_mv_embed_path ){ |
| 157 | + var mv_embed_url = force_mv_embed_path; |
| 158 | + }else{ |
| 159 | + var mv_embed_url = getAddMediaPath( 'mv_embed/mv_embed.js' ); |
| 160 | + } |
153 | 161 | var e = document.createElement("script"); |
154 | 162 | e.setAttribute('src', mv_embed_url); |
155 | 163 | e.setAttribute('type',"text/javascript"); |
— | — | @@ -169,15 +177,16 @@ |
170 | 178 | function getAddMediaPath( replace_str ){ |
171 | 179 | if(!replace_str) |
172 | 180 | replace_str = ''; |
| 181 | + if( force_mv_add_media_wizard_path ) |
| 182 | + return force_mv_add_media_wizard_path + replace_str; |
| 183 | + |
173 | 184 | for(var i=0; i < document.getElementsByTagName('script').length; i++){ |
174 | 185 | var s = document.getElementsByTagName('script')[i]; |
175 | 186 | if( s.src.indexOf('add_media_wizard.js') != -1 ){ |
176 | 187 | //use the external_media_wizard path: |
177 | 188 | return s.src.replace('add_media_wizard.js', replace_str); |
178 | 189 | } |
179 | | - } |
180 | | - js_log('return default path: ' + mv_add_media_wizard_path + replace_str); |
181 | | - return mv_add_media_wizard_path + replace_str; |
| 190 | + } |
182 | 191 | } |
183 | 192 | |
184 | 193 | |