Index: trunk/phase3/js2/mwEmbed/example_usage/Add_Media_Wizard.html |
— | — | @@ -14,7 +14,7 @@ |
15 | 15 | <script type="text/javascript" src="../mv_embed.js?debug=true"></script> |
16 | 16 | <!--<script type="text/javascript" src="../jsScriptLoader.php?class=window.jQuery,mv_embed,remoteSearchDriver,$j.ui,$j.ui.resizable,$j.ui.draggable,$j.ui.dialog,$j.ui.tabs,$j.ui.sortable,$j.cookie,baseRemoteSearch&urid=1257728132531&debug=true&uselang=en"></script> --> |
17 | 17 | <script type="text/javascript"> |
18 | | - js2AddOnloadHook(function(){ |
| 18 | + js2AddOnloadHook(function(){ |
19 | 19 | $j('#add_media_link').addMediaWiz( { |
20 | 20 | 'profile':'html_edit', |
21 | 21 | 'target_textbox': '#wpTextbox1', |
Index: trunk/phase3/js2/mwEmbed/libAddMedia/searchLibs/mediaWikiSearch.js |
— | — | @@ -202,7 +202,7 @@ |
203 | 203 | }; |
204 | 204 | /* |
205 | 205 | //to use once we get the wiki-text parser in shape |
206 | | - var pObj = $mw.parser.pNew( rObj.desc ); |
| 206 | + var pObj = mw.parser.pNew( rObj.desc ); |
207 | 207 | //structured data on commons is based on the "information" template: |
208 | 208 | var tmplInfo = pObj.templates( 'information' ); |
209 | 209 | */ |
Index: trunk/phase3/js2/mwEmbed/libAddMedia/searchLibs/archiveOrgSearch.js |
— | — | @@ -6,11 +6,11 @@ |
7 | 7 | return this.init( iObj ); |
8 | 8 | } |
9 | 9 | archiveOrgSearch.prototype = { |
10 | | - //archive.org constants: |
| 10 | + // Archive.org constants: |
11 | 11 | dnUrl:'http://www.archive.org/download/', |
12 | 12 | dtUrl:'http://www.archive.org/details/', |
13 | 13 | init:function( iObj ){ |
14 | | - //init base class and inherit: |
| 14 | + // Init base class and inherit: |
15 | 15 | var baseSearch = new baseRemoteSearch( iObj ); |
16 | 16 | for(var i in baseSearch){ |
17 | 17 | if(typeof this[i] =='undefined'){ |
— | — | @@ -19,7 +19,7 @@ |
20 | 20 | this['parent_'+i] = baseSearch[i]; |
21 | 21 | } |
22 | 22 | } |
23 | | - //inherit the cp settings for |
| 23 | + // Inherit the cp settings for |
24 | 24 | }, |
25 | 25 | getSearchResults:function(){ |
26 | 26 | //call parent: |
Index: trunk/phase3/js2/mwEmbed/libAddMedia/searchLibs/flickrSearch.js |
— | — | @@ -80,8 +80,8 @@ |
81 | 81 | var resource = data.photos.photo[resource_id]; |
82 | 82 | |
83 | 83 | var rObj = { |
84 | | - 'titleKey' : resource.title + '.jpg', |
85 | | - 'resourceKey': resource.id, |
| 84 | + 'titleKey' : resource.title + '.jpg', |
| 85 | + 'resourceKey': resource.id, |
86 | 86 | 'link' : _this.dtUrl + resource.pathalias + '/'+ resource.id, |
87 | 87 | 'title' : resource.title, |
88 | 88 | 'thumbwidth' : resource.width_t, |
Index: trunk/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js |
— | — | @@ -449,8 +449,10 @@ |
450 | 450 | break; |
451 | 451 | } |
452 | 452 | |
453 | | - if(typestr=='unk') |
| 453 | + if(typestr=='unk'){ |
454 | 454 | js_log("unkown ftype: " + mimetype ); |
| 455 | + return ''; |
| 456 | + } |
455 | 457 | |
456 | 458 | return '<div class="rsd_file_type ui-corner-all ui-state-default ui-widget-content" title="' + gM('mwe-ftype-' + typestr) + '">' + |
457 | 459 | typestr + |
— | — | @@ -1789,7 +1791,7 @@ |
1790 | 1792 | //@@todo we should instead support the wiki number format template system instead of inline calls |
1791 | 1793 | if( cp.sObj.num_results != 0 ){ |
1792 | 1794 | if( cp.sObj.num_results > cp.limit){ |
1793 | | - out+= gM( 'rsd_results_desc_total', [(cp.offset+1), to_num, $mw.lang.formatNumber( cp.sObj.num_results )] ); |
| 1795 | + out+= gM( 'rsd_results_desc_total', [(cp.offset+1), to_num, mw.lang.formatNumber( cp.sObj.num_results )] ); |
1794 | 1796 | }else{ |
1795 | 1797 | out+= gM( 'rsd_results_desc', [(cp.offset+1), to_num] ); |
1796 | 1798 | } |
Index: trunk/phase3/js2/mwEmbed/tests/testLang.js |
— | — | @@ -7,9 +7,9 @@ |
8 | 8 | "mwe-upload-multi" : "Upload {{PLURAL:$1|file|files}}" |
9 | 9 | }); |
10 | 10 | |
11 | | -$mw.lang.loadRS({ |
| 11 | +mw.lang.loadRS({ |
12 | 12 | 'PLURAL' : { "one" : 1 } |
13 | 13 | }); |
14 | 14 | |
15 | 15 | //define a class by the name of this file: |
16 | | -$mw.testLang = {}; |
\ No newline at end of file |
| 16 | +mw.testLang = {}; |
\ No newline at end of file |
Index: trunk/phase3/js2/mwEmbed/libMwApi/mw.proxy.js |
— | — | @@ -246,4 +246,4 @@ |
247 | 247 | } |
248 | 248 | } |
249 | 249 | |
250 | | -})(window.$mw); |
| 250 | +})(window.mw); |
Index: trunk/phase3/js2/mwEmbed/skins/kskin/kskin.js |
— | — | @@ -4,7 +4,7 @@ |
5 | 5 | |
6 | 6 | var kskinConfig = { |
7 | 7 | pClass: 'k-player', |
8 | | - //display time progres |
| 8 | + //display time progress |
9 | 9 | long_time_disp: false, |
10 | 10 | body_options: false, |
11 | 11 | volume_layout: 'horizontal', |
— | — | @@ -38,11 +38,11 @@ |
39 | 39 | '<a href="#" title="' + gM( 'mwe-' + mk ) +'">' + gM( 'mwe-' + mk ) +'</a></li>'; |
40 | 40 | } |
41 | 41 | o+='</ul>' + |
42 | | - //we have to substract the width of the k-menu-bar |
| 42 | + // We have to subtract the width of the k-menu-bar |
43 | 43 | '<div class="k-menu-screens" style="width:' + ( embedObj.playerPixelWidth() -75) + |
44 | 44 | 'px; height:' + (embedObj.playerPixelHeight() - ctrlBuilder.height) + 'px;">'; |
45 | 45 | |
46 | | - //output menu item containers: |
| 46 | + // Output menu item containers: |
47 | 47 | for(i=0; i < ctrlObj.menu_items.length; i++){ |
48 | 48 | o+= '<div class="menu-screen menu-' + ctrlObj.menu_items[i] + '"></div>'; |
49 | 49 | } |
— | — | @@ -57,46 +57,49 @@ |
58 | 58 | var _this = this; |
59 | 59 | var $tp=$j('#' + embedObj.id); |
60 | 60 | |
61 | | - //adds options and bindings: (we do this onClick for faster vidoe tag startup times) |
| 61 | + // Adds options and bindings: (we do this onClick ) |
62 | 62 | var addMvOptions = function(){ |
63 | | - if($j('#' + embedObj.id + ' .k-menu').length != 0 ) |
| 63 | + if( $j('#' + embedObj.id + ' .k-menu').length != 0 ) |
64 | 64 | return false; |
65 | 65 | |
66 | | - $j('#' + embedObj.id + ' .' + _this.pClass).prepend( _this.components['mv_embedded_options'].o( $tp.get(0).ctrlBuilder )); |
| 66 | + $j('#' + embedObj.id + ' .' + _this.pClass).prepend( |
| 67 | + _this.components['mv_embedded_options'].o( $tp.get(0).ctrlBuilder ) |
| 68 | + ); |
67 | 69 | |
68 | | - //by default its hidden: |
| 70 | + // By default its hidden: |
69 | 71 | $tp.find('.k-menu').hide(); |
70 | 72 | |
71 | | - //output menu-items: |
| 73 | + // Output menu-items: |
72 | 74 | for(i=0; i < _this.menu_items.length ; i++){ |
73 | 75 | $tp.find('.k-' + _this.menu_items[i] + '-btn').click(function(){ |
74 | 76 | var mk = $j(this).attr('rel'); |
75 | 77 | $target = $j('#' + embedObj.id + ' .menu-'+mk).hide(); |
76 | | - //gennerate the menu html not already done: |
| 78 | + // Generate the menu html not already done: |
77 | 79 | if( $target.children().length == 0 ){ |
78 | 80 | //call the function show{Menuitem} with target: |
79 | 81 | embedObj['show' + mk.charAt(0).toUpperCase() + mk.substring(1)]( |
80 | 82 | $j('#' + embedObj.id + ' .menu-'+mk) |
81 | 83 | ); |
82 | 84 | } |
83 | | - //slide out the others |
| 85 | + // Slide out the others |
84 | 86 | $j('#' + embedObj.id + ' .menu-screen').hide(); |
85 | 87 | $target.fadeIn("fast"); |
86 | 88 | //don't follow the # link |
87 | 89 | return false; |
88 | 90 | }); |
89 | 91 | } |
90 | | - } |
91 | | - //options menu display: |
| 92 | + } |
| 93 | + |
| 94 | + // Options menu display: |
92 | 95 | $tp.find('.k-options').click(function(){ |
93 | 96 | if($j('#' + embedObj.id + ' .k-menu').length == 0 ){ |
94 | 97 | //stop the player if it does not support overlays: |
95 | 98 | if(!embedObj.supports['overlays']) |
96 | 99 | $tp.get(0).stop(); |
97 | | - //add the options |
| 100 | + // Add the options |
98 | 101 | addMvOptions(); |
99 | 102 | } |
100 | | - //set up the text and menu: |
| 103 | + // Set up the text and menu: |
101 | 104 | var $ktxt = $j(this); |
102 | 105 | var $kmenu = $tp.find('.k-menu'); |
103 | 106 | if( $kmenu.is(':visible') ){ |
Index: trunk/phase3/js2/mwEmbed/skins/ctrlBuilder.js |
— | — | @@ -180,7 +180,7 @@ |
181 | 181 | start: function(event, ui){ |
182 | 182 | var id = (embedObj.pc!=null)?embedObj.pc.pp.id:embedObj.id; |
183 | 183 | embedObj.userSlide=true; |
184 | | - $j(id + ' .play-btn-large').fadeOut('fast'); |
| 184 | + $j( id + ' .play-btn-large').fadeOut('fast'); |
185 | 185 | //if playlist always start at 0 |
186 | 186 | embedObj.start_time_sec = (embedObj.instanceOf == 'mvPlayList')?0: |
187 | 187 | npt2seconds(embedObj.getTimeReq().split('/')[0]); |
— | — | @@ -201,7 +201,7 @@ |
202 | 202 | }, |
203 | 203 | change:function(event, ui){ |
204 | 204 | //only run the onChange event if done by a user slide: |
205 | | - if(embedObj.userSlide){ |
| 205 | + if( embedObj.userSlide ){ |
206 | 206 | embedObj.userSlide=false; |
207 | 207 | embedObj.seeking=true; |
208 | 208 | //stop the monitor timer (if we can) |
— | — | @@ -220,7 +220,7 @@ |
221 | 221 | //up the z-index of the default status indicator: |
222 | 222 | $tp.find('.play_head .ui-slider-handle').css('z-index', 4); |
223 | 223 | $tp.find('.play_head .ui-slider-range').addClass('ui-corner-all').css('z-index', 2); |
224 | | - //extended class list for jQuery ui themeing (we can probably refactor this with custom buffering highliter) |
| 224 | + //extended class list for jQuery ui themeing (we can probably refactor this with custom buffering highlighter) |
225 | 225 | $tp.find('.play_head').append( this.getMvBufferHtml() ); |
226 | 226 | |
227 | 227 | $opt = $j('#mv_vid_options_'+embedObj.id); |
Index: trunk/phase3/js2/mwEmbed/skins/mvpcf/styles.css |
— | — | @@ -560,7 +560,7 @@ |
561 | 561 | font-size:20px; |
562 | 562 | margin:4px 0px 4px 11px; |
563 | 563 | padding:0; |
564 | | - color:#F0F0F0; |
| 564 | + color:#FFF; |
565 | 565 | font-family:arial,sans-serif; |
566 | 566 | } |
567 | 567 | |
Index: trunk/phase3/js2/mwEmbed/mv_embed.js |
— | — | @@ -41,6 +41,7 @@ |
42 | 42 | return false; |
43 | 43 | } |
44 | 44 | } |
| 45 | + |
45 | 46 | if( typeof mvCssPaths == 'undefined' ) |
46 | 47 | mvCssPaths = {}; |
47 | 48 | |
— | — | @@ -76,9 +77,9 @@ |
77 | 78 | "$j.Jcrop" : "libClipEdit/Jcrop/js/jquery.Jcrop.js", |
78 | 79 | "$j.fn.simpleUploadForm" : "libAddMedia/simpleUploadForm.js", |
79 | 80 | |
80 | | - "$mw.proxy" : "libMwApi/mw.proxy.js", |
| 81 | + "mw.proxy" : "libMwApi/mw.proxy.js", |
81 | 82 | |
82 | | - "$mw.testLang" : "tests/testLang.js", |
| 83 | + "mw.testLang" : "tests/testLang.js", |
83 | 84 | |
84 | 85 | "ctrlBuilder" : "skins/ctrlBuilder.js", |
85 | 86 | "kskinConfig" : "skins/kskin/kskin.js", |
— | — | @@ -191,19 +192,19 @@ |
192 | 193 | // For use when mv_embed with script-loader is in the root MediaWiki path |
193 | 194 | var mediaWiki_mvEmbed_path = 'js2/mwEmbed/'; |
194 | 195 | |
195 | | -//The global scope: will be depreciated once we get everything into $mw |
| 196 | +//The global scope: will be depreciated once we get everything into mw |
196 | 197 | var _global = this; |
197 | 198 | |
198 | 199 | /* |
199 | | -* setup the empty global $mw object |
| 200 | +* setup the empty global mw object |
200 | 201 | * will ensure all our functions and variables are properly namespaced |
201 | 202 | * reducing chance of conflicts |
202 | 203 | */ |
203 | | -if(!window['$mw']){ |
204 | | - window['$mw'] = {} |
| 204 | +if(!window['mw']){ |
| 205 | + window['mw'] = {} |
205 | 206 | } |
206 | 207 | |
207 | | -//@@todo move these into $mw |
| 208 | +//@@todo move these into mw |
208 | 209 | var global_req_cb = new Array(); // The global request callback array |
209 | 210 | |
210 | 211 | // Get the mv_embed location if it has not been set |
— | — | @@ -211,10 +212,10 @@ |
212 | 213 | var mv_embed_path = getMvEmbedPath(); |
213 | 214 | } |
214 | 215 | /** |
215 | | -* The global $mw object: |
| 216 | +* The global mw object: |
216 | 217 | * |
217 | 218 | * Any global functions/classes that are not jQuery plugins should make |
218 | | -* there way into the $mw namespace |
| 219 | +* there way into the mw namespace |
219 | 220 | */ |
220 | 221 | (function( $ ) { |
221 | 222 | /* |
— | — | @@ -230,6 +231,10 @@ |
231 | 232 | // the version of mwEmbed |
232 | 233 | $.version = '1.0r21'; |
233 | 234 | |
| 235 | + //special case of commons api url |
| 236 | + //(used for default subtitles server for media with a "wikiTitleKey" atm) |
| 237 | + //(@@todo eventually we should have wikiTitleKey be namespaced with interwiki ns |
| 238 | + $.commons_api_url = 'http://commons.wikimedia.org/w/api.php'; |
234 | 239 | /* |
235 | 240 | * some global containers flags |
236 | 241 | */ |
— | — | @@ -240,7 +245,7 @@ |
241 | 246 | $.req_cb = new Array() // The global request callback array |
242 | 247 | |
243 | 248 | /* |
244 | | - * Language classes $mw.lang |
| 249 | + * Language classes mw.lang |
245 | 250 | * |
246 | 251 | * Localized Language support attempts to mirror the functionality of Language.php in MediaWiki |
247 | 252 | * It contains methods for loading and transforming msg text |
— | — | @@ -602,9 +607,9 @@ |
603 | 608 | |
604 | 609 | // ~ probably a better algorithm out there / should mirror php parser flow ~ |
605 | 610 | // (we are already running white-space issues ie php parse strips whitespace differently) |
| 611 | + // or at least expose something similar to: http://www.mediawiki.org/wiki/Extension:Page_Object_Model |
606 | 612 | |
607 | 613 | // ... but I am having fun with recursion so here it is... |
608 | | - // or at least mirror: http://www.mediawiki.org/wiki/Extension:Page_Object_Model |
609 | 614 | function rdpp ( txt , cn){ |
610 | 615 | var node = {}; |
611 | 616 | //inspect each char |
— | — | @@ -649,8 +654,7 @@ |
650 | 655 | tObj["name"] = tname.split(':').shift(); |
651 | 656 | tObj["arg"] = tname.split(':').pop(); |
652 | 657 | } |
653 | | - |
654 | | - //js_log("TNAME::" + tObj["name"] + ' from:: ' + ts); |
| 658 | + |
655 | 659 | var pSet = ts.split('\|'); |
656 | 660 | pSet.splice(0,1); |
657 | 661 | if( pSet.length ){ |
— | — | @@ -780,21 +784,31 @@ |
781 | 785 | //return the parserObj |
782 | 786 | return new parseObj( wikiText, opt) ; |
783 | 787 | } |
784 | | - |
785 | | -})(window.$mw); |
| 788 | + |
| 789 | + /* |
| 790 | + * API and request functions |
| 791 | + */ |
| 792 | + $.getLocalApiUrl = function() { |
| 793 | + if ( typeof wgServer != 'undefined' && typeof wgScriptPath != 'undefined') { |
| 794 | + return wgServer + wgScriptPath + '/api.php'; |
| 795 | + } |
| 796 | + return false; |
| 797 | + } |
| 798 | + |
| 799 | +})(window.mw); |
786 | 800 | |
787 | 801 | //load in js2 stopgap into proper location: |
788 | 802 | if( typeof gMsg != 'undefined'){ |
789 | | - $mw.lang.loadGM( gMsg ) |
| 803 | + mw.lang.loadGM( gMsg ) |
790 | 804 | } |
791 | 805 | |
792 | 806 | //setup legacy global shortcuts: |
793 | | -var loadGM = $mw.lang.loadGM; |
794 | | -var loadRS = $mw.lang.loadRS; |
795 | | -var gM = $mw.lang.gM; |
| 807 | +var loadGM = mw.lang.loadGM; |
| 808 | +var loadRS = mw.lang.loadRS; |
| 809 | +var gM = mw.lang.gM; |
796 | 810 | |
797 | 811 | // All default messages in [English] should be overwritten by the CMS language message system. |
798 | | -$mw.lang.loadGM({ |
| 812 | +mw.lang.loadGM({ |
799 | 813 | "mwe-loading_txt" : "Loading ...", |
800 | 814 | "mwe-size-gigabytes" : "$1 GB", |
801 | 815 | "mwe-size-megabytes" : "$1 MB", |
— | — | @@ -1008,13 +1022,13 @@ |
1009 | 1023 | * checks for jQuery and adds the $j noConflict var |
1010 | 1024 | */ |
1011 | 1025 | jQueryCheck: function( callback ) { |
1012 | | - //js_log( 'jQueryCheck::' ); |
| 1026 | + //js_log( 'jQueryCheck::' + this.jQuerySetupFlag); |
1013 | 1027 | var _this = this; |
1014 | 1028 | // Skip stuff if $j is already loaded: |
1015 | 1029 | if( _global['$j'] ){ |
1016 | 1030 | callback(); //call the callback now |
1017 | 1031 | callback=null; |
1018 | | - // Check if we have jquery-ui css loaded and assigned skin globals |
| 1032 | + // This is tricky because js2stopgap registers $j without doing the "setup" |
1019 | 1033 | if( _this.jQuerySetupFlag ) |
1020 | 1034 | return ; |
1021 | 1035 | } |
— | — | @@ -1031,13 +1045,13 @@ |
1032 | 1046 | // Setup our global settings using the (jQuery helper) |
1033 | 1047 | |
1034 | 1048 | // Set up the skin path |
1035 | | - _global['mv_jquery_skin_path'] = mv_embed_path + 'jquery/jquery.ui/themes/' + $mw.conf['jui_skin'] + '/'; |
1036 | | - _global['mv_skin_img_path'] = mv_embed_path + 'skins/' + $mw.conf['skin_name'] + '/images/'; |
| 1049 | + _global['mv_jquery_skin_path'] = mv_embed_path + 'jquery/jquery.ui/themes/' + mw.conf['jui_skin'] + '/'; |
| 1050 | + _global['mv_skin_img_path'] = mv_embed_path + 'skins/' + mw.conf['skin_name'] + '/images/'; |
1037 | 1051 | _global['mv_default_thumb_url'] = mv_skin_img_path + 'vid_default_thumb.jpg'; |
1038 | 1052 | |
1039 | 1053 | // Make sure the skin/style sheets are always available: |
1040 | 1054 | loadExternalCss( mv_jquery_skin_path + 'jquery-ui-1.7.1.custom.css' ); |
1041 | | - loadExternalCss( mv_embed_path + 'skins/' + $mw.conf['skin_name'] + '/styles.css' ); |
| 1055 | + loadExternalCss( mv_embed_path + 'skins/' + mw.conf['skin_name'] + '/styles.css' ); |
1042 | 1056 | |
1043 | 1057 | // Set up AJAX to not send dynamic URLs for loading scripts (we control that with |
1044 | 1058 | // the scriptLoader) |
— | — | @@ -1050,6 +1064,7 @@ |
1051 | 1065 | mv_jqueryBindings(); |
1052 | 1066 | _this.jQuerySetupFlag = true; |
1053 | 1067 | |
| 1068 | + //js_log('should run callback: ' + callback); |
1054 | 1069 | // Run the callback if not already run above |
1055 | 1070 | if( callback ) { |
1056 | 1071 | callback(); |
— | — | @@ -1078,9 +1093,9 @@ |
1079 | 1094 | ]; |
1080 | 1095 | |
1081 | 1096 | //add any requested skins (supports multiple skins per single page) |
1082 | | - if( $mw.skin_list ){ |
1083 | | - for(var i in $mw.skin_list ){ |
1084 | | - depReq[0].push( $mw.skin_list[i] + 'Config' ); |
| 1097 | + if( mw.skin_list ){ |
| 1098 | + for(var i in mw.skin_list ){ |
| 1099 | + depReq[0].push( mw.skin_list[i] + 'Config' ); |
1085 | 1100 | } |
1086 | 1101 | } |
1087 | 1102 | |
— | — | @@ -1124,8 +1139,8 @@ |
1125 | 1140 | function mwLoad( loadSet, callback ) { |
1126 | 1141 | mvJsLoader.doLoad( loadSet, callback ); |
1127 | 1142 | } |
1128 | | -//$mw.shortcut |
1129 | | -$mw.load = mwLoad; |
| 1143 | +//mw.shortcut |
| 1144 | +mw.load = mwLoad; |
1130 | 1145 | |
1131 | 1146 | // Load an external JS file. Similar to jquery .require plugin, |
1132 | 1147 | // but checks for object availability rather than load state. |
— | — | @@ -1139,11 +1154,11 @@ |
1140 | 1155 | * $j(document).ready( function(){ */ |
1141 | 1156 | function mwdomReady( force ) { |
1142 | 1157 | js_log( 'f:mwdomReady:' ); |
1143 | | - if( !force && $mw.init_done ) { |
| 1158 | + if( !force && mw.init_done ) { |
1144 | 1159 | js_log( "mw done, do nothing..." ); |
1145 | 1160 | return false; |
1146 | 1161 | } |
1147 | | - $mw.init_done = true; |
| 1162 | + mw.init_done = true; |
1148 | 1163 | // Handle the execution of queued functions with jQuery "ready" |
1149 | 1164 | |
1150 | 1165 | // Check if this page has a video, audio or playlist tag |
— | — | @@ -1159,9 +1174,9 @@ |
1160 | 1175 | if(e[j][k] && typeof( e[j][k]) == 'object'){ |
1161 | 1176 | var sn = e[j][k].getAttribute('class'); |
1162 | 1177 | if( sn && sn != ''){ |
1163 | | - for(var n=0;n< $mw.valid_skins.length;n++){ |
1164 | | - if( sn.indexOf($mw.valid_skins[n]) !== -1){ |
1165 | | - $mw.skin_list.push( $mw.valid_skins[n] ); |
| 1178 | + for(var n=0;n< mw.valid_skins.length;n++){ |
| 1179 | + if( sn.indexOf(mw.valid_skins[n]) !== -1){ |
| 1180 | + mw.skin_list.push( mw.valid_skins[n] ); |
1166 | 1181 | } |
1167 | 1182 | } |
1168 | 1183 | } |
— | — | @@ -1183,15 +1198,14 @@ |
1184 | 1199 | //js2AddOnloadHook: ensure jQuery and the DOM are ready |
1185 | 1200 | function js2AddOnloadHook( func ) { |
1186 | 1201 | //js_log('js2AddOnloadHook:: jquery:' +func); |
1187 | | - //check for jQuery then add the load event (to run after video tag rewrites (if present) |
1188 | | - mvJsLoader.jQueryCheck( function() { |
1189 | | - if( mvJsLoader.doneReadyEvents ) { |
1190 | | - //js_log('run queued event: ' + func); |
1191 | | - func(); |
1192 | | - } else { |
1193 | | - mvJsLoader.addLoadEvent( func ); |
1194 | | - } |
1195 | | - }); |
| 1202 | + // If we are ready run directly else add load event: |
| 1203 | + if( mvJsLoader.doneReadyEvents ) { |
| 1204 | + js_log('run queued event: ' + func); |
| 1205 | + func(); |
| 1206 | + } else { |
| 1207 | + js_log('add to load event: ' + func); |
| 1208 | + mvJsLoader.addLoadEvent( func ); |
| 1209 | + } |
1196 | 1210 | } |
1197 | 1211 | // Deprecated mwAddOnloadHook in favour of js2 naming (for clear separation of js2 code from old MW code |
1198 | 1212 | var mwAddOnloadHook = js2AddOnloadHook; |
— | — | @@ -1244,7 +1258,7 @@ |
1245 | 1259 | if( this.selector ){ |
1246 | 1260 | var _this = this; |
1247 | 1261 | //load the dragger and "setup" |
1248 | | - $mw.load( ['$j.fn.dragDropFile'], function(){ |
| 1262 | + mw.load( ['$j.fn.dragDropFile'], function(){ |
1249 | 1263 | $j(_this.selector).dragDropFile(); |
1250 | 1264 | }); |
1251 | 1265 | } |
— | — | @@ -1257,18 +1271,18 @@ |
1258 | 1272 | $.apiProxy = function( mode, pConf, callback ){ |
1259 | 1273 | js_log('do apiProxy setup'); |
1260 | 1274 | mvJsLoader.doLoad( [ |
1261 | | - '$mw.proxy', |
| 1275 | + 'mw.proxy', |
1262 | 1276 | 'JSON' |
1263 | 1277 | ], function(){ |
1264 | 1278 | //do the proxy setup or |
1265 | 1279 | if( mode == 'client'){ |
1266 | 1280 | //just do the setup (no callbcak for client setup) |
1267 | | - $mw.proxy.client( pConf ); |
| 1281 | + mw.proxy.client( pConf ); |
1268 | 1282 | if( callback ) |
1269 | 1283 | callback(); |
1270 | 1284 | }else if( mode=='server' ){ |
1271 | 1285 | //do the request with the callback |
1272 | | - $mw.proxy.server( pConf , callback ); |
| 1286 | + mw.proxy.server( pConf , callback ); |
1273 | 1287 | } |
1274 | 1288 | }); |
1275 | 1289 | } |
— | — | @@ -1306,7 +1320,7 @@ |
1307 | 1321 | |
1308 | 1322 | // Load the mv_embed_base skin: |
1309 | 1323 | loadExternalCss( mv_jquery_skin_path + 'jquery-ui-1.7.1.custom.css' ); |
1310 | | - loadExternalCss( mv_embed_path + 'skins/' + $mw.conf['skin_name'] + '/styles.css' ); |
| 1324 | + loadExternalCss( mv_embed_path + 'skins/' + mw.conf['skin_name'] + '/styles.css' ); |
1311 | 1325 | // Load all the required libs: |
1312 | 1326 | mvJsLoader.jQueryCheck( function() { |
1313 | 1327 | // Load with staged dependencies (for IE that does not execute in order) |
— | — | @@ -1340,7 +1354,7 @@ |
1341 | 1355 | iObj['target_sequence_container'] = this.selector; |
1342 | 1356 | // Issue a request to get the CSS file (if not already included): |
1343 | 1357 | loadExternalCss( mv_jquery_skin_path + 'jquery-ui-1.7.1.custom.css' ); |
1344 | | - loadExternalCss( mv_embed_path + 'skins/' + $mw.conf['skin_name'] + '/mv_sequence.css' ); |
| 1358 | + loadExternalCss( mv_embed_path + 'skins/' + mw.conf['skin_name'] + '/mv_sequence.css' ); |
1345 | 1359 | // Make sure we have the required mv_embed libs (they are not loaded when no video |
1346 | 1360 | // element is on the page) |
1347 | 1361 | mvJsLoader.embedVideoCheck( function() { |
— | — | @@ -1386,7 +1400,7 @@ |
1387 | 1401 | iObj = {}; |
1388 | 1402 | // Add the base theme CSS: |
1389 | 1403 | loadExternalCss( mv_jquery_skin_path + 'jquery-ui-1.7.1.custom.css' ); |
1390 | | - loadExternalCss( mv_embed_path + 'skins/' + $mw.conf['skin_name'] + '/styles.css' ); |
| 1404 | + loadExternalCss( mv_embed_path + 'skins/' + mw.conf['skin_name'] + '/styles.css' ); |
1391 | 1405 | |
1392 | 1406 | // Check if we already have Firefogg loaded (the call just updates the element's |
1393 | 1407 | // properties) |
— | — | @@ -1594,9 +1608,9 @@ |
1595 | 1609 | } |
1596 | 1610 | |
1597 | 1611 | $.mwProxy = function( apiConf ){ |
1598 | | - mvJsLoader.doLoad( ['$mw.apiProxy'], |
| 1612 | + mvJsLoader.doLoad( ['mw.apiProxy'], |
1599 | 1613 | function(){ |
1600 | | - $mw.apiProxy( apiConf ); |
| 1614 | + mw.apiProxy( apiConf ); |
1601 | 1615 | }); |
1602 | 1616 | } |
1603 | 1617 | })(jQuery); |
— | — | @@ -1729,10 +1743,10 @@ |
1730 | 1744 | } |
1731 | 1745 | // Generate the URL if it's missing |
1732 | 1746 | if( typeof options.url == 'undefined' || !options.url ) { |
1733 | | - if( !wgServer || ! wgScriptPath ) { |
| 1747 | + if( typeof wgServer == 'undefined' ) { |
1734 | 1748 | return js_error('Error: no api url for api request'); |
1735 | 1749 | } |
1736 | | - options.url = mwGetLocalApiUrl(); |
| 1750 | + options.url = mw.getLocalApiUrl(); |
1737 | 1751 | } |
1738 | 1752 | if( typeof options.data == 'undefined' ) |
1739 | 1753 | options.data = {}; |
— | — | @@ -1745,10 +1759,10 @@ |
1746 | 1760 | options.data['action'] = 'query'; |
1747 | 1761 | |
1748 | 1762 | // js_log('do api req: ' + options.url +'?' + jQuery.param(options.data) ); |
1749 | | - if( options.url == 'proxy' && $mw.proxy){ |
1750 | | - //assume the proxy is already "setup" since $mw.proxy is defined. |
| 1763 | + if( options.url == 'proxy' && mw.proxy){ |
| 1764 | + //assume the proxy is already "setup" since mw.proxy is defined. |
1751 | 1765 | // @@todo we probably integrate that setup into the api call |
1752 | | - $mw.proxy.doRequest( options.data, callback); |
| 1766 | + mw.proxy.doRequest( options.data, callback); |
1753 | 1767 | }else if( parseUri( document.URL ).host == parseUri( options.url ).host ) { |
1754 | 1768 | // Local request: do API request directly |
1755 | 1769 | $j.ajax({ |
— | — | @@ -1777,18 +1791,12 @@ |
1778 | 1792 | req_url += paramAnd + encodeURIComponent( i ) + '=' + encodeURIComponent( options.data[i] ); |
1779 | 1793 | paramAnd = '&'; |
1780 | 1794 | } |
1781 | | - var fname = 'mycpfn_' + ( $mw.cb_count++ ); |
| 1795 | + var fname = 'mycpfn_' + ( mw.cb_count++ ); |
1782 | 1796 | _global[ fname ] = callback; |
1783 | 1797 | req_url += '&' + options.jsonCB + '=' + fname; |
1784 | 1798 | loadExternalJs( req_url ); |
1785 | 1799 | } |
1786 | 1800 | } |
1787 | | -function mwGetLocalApiUrl( url ) { |
1788 | | - if ( typeof wgServer != 'undefined' && typeof wgScriptPath != 'undefined') { |
1789 | | - return wgServer + wgScriptPath + '/api.php'; |
1790 | | - } |
1791 | | - return false; |
1792 | | -} |
1793 | 1801 | // Do a "normal" request |
1794 | 1802 | function do_request( req_url, callback ) { |
1795 | 1803 | js_log( 'do_request::req_url:' + req_url + ' != ' + parseUri( req_url ).host ); |
— | — | @@ -1950,7 +1958,7 @@ |
1951 | 1959 | req_param += 'urid=' + urid; |
1952 | 1960 | }else{ |
1953 | 1961 | // Otherwise, just use the mv_embed version |
1954 | | - req_param += 'urid=' + $mw.version; |
| 1962 | + req_param += 'urid=' + mw.version; |
1955 | 1963 | } |
1956 | 1964 | //add the lang param: |
1957 | 1965 | var langKey = parseUri( mv_embed_url ).queryKey['uselang']; |
— | — | @@ -2017,8 +2025,8 @@ |
2018 | 2026 | */ |
2019 | 2027 | function js_log( string ) { |
2020 | 2028 | // Add any prepend debug strings if necessary (used for cross browser) |
2021 | | - if( $mw.conf['debug_pre'] ) |
2022 | | - string = $mw.conf['debug_pre']+ string; |
| 2029 | + if( mw.conf['debug_pre'] ) |
| 2030 | + string = mw.conf['debug_pre']+ string; |
2023 | 2031 | |
2024 | 2032 | if( window.console ) { |
2025 | 2033 | window.console.log( string ); |
Index: trunk/phase3/js2/mwEmbed/libEmbedVideo/embedVideo.js |
— | — | @@ -54,9 +54,6 @@ |
55 | 55 | "mwe-copy-code" : "Copy code" |
56 | 56 | }); |
57 | 57 | |
58 | | -//set the globals: |
59 | | -var commons_api_url = 'http://commons.wikimedia.org/w/api.php'; |
60 | | - |
61 | 58 | var default_video_attributes = { |
62 | 59 | "id" : null, |
63 | 60 | "class" : null, |
— | — | @@ -134,7 +131,7 @@ |
135 | 132 | mvEmbed.flist.push( swap_done_callback ); |
136 | 133 | |
137 | 134 | //get mv_embed location if it has not been set |
138 | | - js_log('mv_video_embed:: ' + $mw.version); |
| 135 | + js_log('mv_video_embed:: ' + mw.version); |
139 | 136 | |
140 | 137 | var loadPlaylistLib=false; |
141 | 138 | |
— | — | @@ -142,10 +139,10 @@ |
143 | 140 | js_log( "Do SWAP: " + $j(this_elm).attr("id") + ' tag: '+ this_elm.tagName.toLowerCase() ); |
144 | 141 | |
145 | 142 | if( $j(this_elm).attr("id") == '' ){ |
146 | | - $j(this_elm).attr("id", 'v'+ $mw.player_list.length); |
| 143 | + $j(this_elm).attr("id", 'v'+ mw.player_list.length); |
147 | 144 | } |
148 | 145 | //store a global reference to the id |
149 | | - $mw.player_list.push( $j(this_elm).attr("id") ); |
| 146 | + mw.player_list.push( $j(this_elm).attr("id") ); |
150 | 147 | |
151 | 148 | //if video doSwap |
152 | 149 | switch( this_elm.tagName.toLowerCase()){ |
— | — | @@ -248,16 +245,16 @@ |
249 | 246 | $j('#'+embed_video.id).get(0).init_with_sources_loaded(); |
250 | 247 | } |
251 | 248 | |
252 | | - js_log('done with child: ' + embed_video.id + ' len:' + $mw.player_list.length); |
| 249 | + js_log('done with child: ' + embed_video.id + ' len:' + mw.player_list.length); |
253 | 250 | return true; |
254 | 251 | }, |
255 | 252 | //this should not be needed. |
256 | 253 | checkClipsReady : function(){ |
257 | 254 | //js_log('checkClipsReady'); |
258 | 255 | var is_ready=true; |
259 | | - for(var i=0; i < $mw.player_list.length; i++){ |
260 | | - if( $j('#'+$mw.player_list[i]).length !=0){ |
261 | | - var cur_vid = $j('#'+$mw.player_list[i]).get(0); |
| 256 | + for(var i=0; i < mw.player_list.length; i++){ |
| 257 | + if( $j('#'+mw.player_list[i]).length !=0){ |
| 258 | + var cur_vid = $j('#'+mw.player_list[i]).get(0); |
262 | 259 | is_ready = ( cur_vid.ready_to_play ) ? is_ready : false; |
263 | 260 | if( !is_ready && cur_vid.load_error ){ |
264 | 261 | is_ready=true; |
— | — | @@ -855,15 +852,15 @@ |
856 | 853 | //set the skin name from the class |
857 | 854 | var sn = element.getAttribute('class'); |
858 | 855 | if( sn && sn != ''){ |
859 | | - for(var n=0;n< $mw.valid_skins.length;n++){ |
860 | | - if( sn.indexOf($mw.valid_skins[n]) !== -1){ |
861 | | - this.skin_name = $mw.valid_skins[n]; |
| 856 | + for(var n=0;n< mw.valid_skins.length;n++){ |
| 857 | + if( sn.indexOf(mw.valid_skins[n]) !== -1){ |
| 858 | + this.skin_name = mw.valid_skins[n]; |
862 | 859 | } |
863 | 860 | } |
864 | 861 | } |
865 | 862 | //set the default if unset: |
866 | 863 | if(!this.skin_name) |
867 | | - this.skin_name = $mw.conf.skin_name; |
| 864 | + this.skin_name = mw.conf.skin_name; |
868 | 865 | |
869 | 866 | //make sure startOffset is cast as an int |
870 | 867 | if( this.startOffset && this.startOffset.split(':').length >= 2) |
— | — | @@ -878,7 +875,7 @@ |
879 | 876 | js_log("duration is: " + this.duration); |
880 | 877 | |
881 | 878 | //get defaults |
882 | | - var dwh = $mw.conf['video_size'].split('x'); |
| 879 | + var dwh = mw.conf['video_size'].split('x'); |
883 | 880 | this.width = element.style.width ? element.style.width : dwh[0]; |
884 | 881 | if( element.tagName == 'AUDIO' ){ |
885 | 882 | this.height = element.style.height ? element.style.height : 0; |
— | — | @@ -1189,7 +1186,7 @@ |
1190 | 1187 | }; |
1191 | 1188 | do_api_req({ |
1192 | 1189 | 'data':reqObj, |
1193 | | - 'url': commons_api_url |
| 1190 | + 'url': mw.commons_api_url |
1194 | 1191 | }, function(data){ |
1195 | 1192 | //empty the videos: |
1196 | 1193 | $j('#dc_'+ _this.id + ' .related_vids ul').html(' '); |
— | — | @@ -2457,9 +2454,9 @@ |
2458 | 2455 | } |
2459 | 2456 | if( selected_player ) |
2460 | 2457 | { |
2461 | | - for(var i=0; i < $mw.player_list.length; i++) |
| 2458 | + for(var i=0; i < mw.player_list.length; i++) |
2462 | 2459 | { |
2463 | | - var embed = $j('#'+$mw.player_list[i]).get(0); |
| 2460 | + var embed = $j('#'+mw.player_list[i]).get(0); |
2464 | 2461 | if(embed.media_element.selected_source && (embed.media_element.selected_source.mime_type == mime_type)) |
2465 | 2462 | { |
2466 | 2463 | embed.selectPlayer(selected_player); |
Index: trunk/phase3/js2/mwEmbed/libEmbedVideo/nativeEmbed.js |
— | — | @@ -157,13 +157,14 @@ |
158 | 158 | } |
159 | 159 | }, |
160 | 160 | monitor : function(){ |
161 | | - this.getVID(); //make shure we have .vid obj |
| 161 | + this.getVID(); //make sure we have .vid obj |
162 | 162 | if(!this.vid){ |
163 | 163 | js_log('could not find video embed: '+this.id + ' stop monitor'); |
164 | 164 | this.stopMonitor(); |
165 | 165 | return false; |
166 | 166 | } |
167 | | - //don't update status if we are not the current clip (playlist leekage?) .. should move to playlist overwite of monitor? |
| 167 | + //don't update status if we are not the current clip |
| 168 | + //(playlist leakage?) .. should move to playlist overwrite of monitor? |
168 | 169 | if(this.pc){ |
169 | 170 | if(this.pc.pp.cur_clip.id != this.pc.id) |
170 | 171 | return true; |
Index: trunk/phase3/js2/mwEmbed/libTimedText/mvTextInterface.js |
— | — | @@ -27,15 +27,14 @@ |
28 | 28 | //init a new availableTracks obj: |
29 | 29 | this.availableTracks = new Array(); |
30 | 30 | //set the parent embed object: |
31 | | - this.pe=parentEmbed; |
| 31 | + this.pe = parentEmbed; |
32 | 32 | //parse roe if not already done: |
33 | | - this.getTimedTextTracks(); |
| 33 | + this.getTextTracks(); |
34 | 34 | }, |
35 | 35 | //@@todo separate out data loader & data display |
36 | | - getTimedTextTracks:function(){ |
| 36 | + getTextTracks:function(){ |
37 | 37 | //js_log("load timed text from roe: "+ this.pe.roe); |
38 | 38 | var _this = this; |
39 | | - var apiUrl = mwGetLocalApiUrl(); |
40 | 39 | //if roe not yet loaded do load it: |
41 | 40 | if(this.pe.roe || _this.pe.wikiTitleKey ){ |
42 | 41 | if(!this.pe.media_element.addedROEData){ |
— | — | @@ -46,35 +45,9 @@ |
47 | 46 | _this.pe.media_element.addROE(data); |
48 | 47 | _this.getParseTimedText_rowReady(); |
49 | 48 | }); |
50 | | - }else if( _this.pe.wikiTitleKey ){ |
| 49 | + }else if( _this.pe.wikiTitleKey ){ |
51 | 50 | //check for a clear namespace key: |
52 | | - var timedtext_ns = 102; |
53 | | - if( wgNamespaceIds && wgNamespaceIds['timedtext']){ |
54 | | - timedtext_ns = wgNamespaceIds['timedtext']; |
55 | | - } |
56 | | - do_api_req({ |
57 | | - 'url' : apiUrl, |
58 | | - 'data': { |
59 | | - 'list' : 'allpages', |
60 | | - 'apprefix' : _this.pe.wikiTitleKey, |
61 | | - 'apnamespace' : timedtext_ns, |
62 | | - 'prop':'revisions' |
63 | | - } |
64 | | - }, function( subData ) { |
65 | | - if( subData.error && subData.error.code == 'apunknown_apnamespace'){ |
66 | | - do_api_req({ |
67 | | - 'url' : apiUrl, |
68 | | - 'data': { |
69 | | - 'list' : 'allpages', |
70 | | - 'apprefix' : 'TimedText:' + _this.pe.wikiTitleKey, |
71 | | - } |
72 | | - }, function( subData ) { |
73 | | - _this.doProcSubPages( subData, wgServer + wgScriptPath); |
74 | | - }); |
75 | | - }else{ |
76 | | - _this.doProcSubPages( subData, wgServer + wgScriptPath); |
77 | | - } |
78 | | - }); |
| 51 | + _this.getTextTracksWikiTitle() |
79 | 52 | } |
80 | 53 | }else{ |
81 | 54 | js_log('row data ready (no roe request)'); |
— | — | @@ -88,6 +61,38 @@ |
89 | 62 | } |
90 | 63 | } |
91 | 64 | }, |
| 65 | + getTextTracksWikiTitle:function(){ |
| 66 | + var apiUrl = mw.getLocalApiUrl(); |
| 67 | + var _this = this; |
| 68 | + |
| 69 | + var timedtext_ns = 102; |
| 70 | + if( typeof wgNamespaceIds != 'undefined' && wgNamespaceIds['timedtext']){ |
| 71 | + timedtext_ns = wgNamespaceIds['timedtext']; |
| 72 | + } |
| 73 | + do_api_req({ |
| 74 | + 'url' : apiUrl, |
| 75 | + 'data': { |
| 76 | + 'list' : 'allpages', |
| 77 | + 'apprefix' : _this.pe.wikiTitleKey, |
| 78 | + 'apnamespace' : timedtext_ns, |
| 79 | + 'prop':'revisions' |
| 80 | + } |
| 81 | + }, function( subData ) { |
| 82 | + if( subData.error && subData.error.code == 'apunknown_apnamespace'){ |
| 83 | + do_api_req({ |
| 84 | + 'url' : apiUrl, |
| 85 | + 'data': { |
| 86 | + 'list' : 'allpages', |
| 87 | + 'apprefix' : 'TimedText:' + _this.pe.wikiTitleKey, |
| 88 | + } |
| 89 | + }, function( subData ) { |
| 90 | + _this.doProcSubPages( subData, wgServer + wgScriptPath); |
| 91 | + }); |
| 92 | + }else{ |
| 93 | + _this.doProcSubPages( subData, wgServer + wgScriptPath); |
| 94 | + } |
| 95 | + }); |
| 96 | + }, |
92 | 97 | doProcSubPages: function( subData, hostPath ){ |
93 | 98 | var _this = this; |
94 | 99 | //look for text tracks: |
— | — | @@ -159,7 +164,7 @@ |
160 | 165 | js_log('image is shared checking commons for subtitles'); |
161 | 166 | //found shared repo assume commons: |
162 | 167 | do_api_req({ |
163 | | - 'url': 'http://commons.wikimedia.org/w/api.php', |
| 168 | + 'url': mw.commons_api_url, |
164 | 169 | 'data':{ |
165 | 170 | 'list' : 'allpages', |
166 | 171 | 'apprefix' : _this.pe.wikiTitleKey, |
Index: trunk/phase3/js2/apiProxyPage.js |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | * Since this is proxy server set a pre-append debug flag to know which debug msgs are coming from where |
10 | 10 | */ |
11 | 11 | |
12 | | -$mw.conf['debug_pre'] = 'Proxy'; |
| 12 | +mw.conf['debug_pre'] = 'Proxy'; |
13 | 13 | |
14 | 14 | if( !mwApiProxyConfig ) |
15 | 15 | var mwApiProxyConfig = {}; |
Index: trunk/phase3/js2/remoteMwEmbed.js |
— | — | @@ -36,7 +36,7 @@ |
37 | 37 | if(wgPageName.indexOf("TimedText") === 0){ |
38 | 38 | load_mv_embed(function(){ |
39 | 39 | // Load with mw loader to get localized interface: |
40 | | - $mw.load( ['mvTimeTextEdit'],function(){ |
| 40 | + mw.load( ['mvTimeTextEdit'],function(){ |
41 | 41 | //could run init here (but mvTimeTextEdit included onLoad actions) |
42 | 42 | }); |
43 | 43 | }); |
— | — | @@ -184,7 +184,7 @@ |
185 | 185 | } |
186 | 186 | function load_mv_embed( callback ) { |
187 | 187 | // Inject mv_embed if needed |
188 | | - if( typeof $mw == 'undefined' ) { |
| 188 | + if( typeof mw == 'undefined' ) { |
189 | 189 | if( ( mwReqParam['uselang'] || mwReqParam['useloader'] ) && mwUseScriptLoader){ |
190 | 190 | var rurl = mwEmbedHostPath + '/mwEmbed/jsScriptLoader.php?class=mv_embed'; |
191 | 191 | // Add jQuery too if we need it: |
— | — | @@ -202,7 +202,7 @@ |
203 | 203 | } |
204 | 204 | |
205 | 205 | function check_for_mv_embed( callback ) { |
206 | | - if( typeof $mw == 'undefined' ) { |
| 206 | + if( typeof mw == 'undefined' ) { |
207 | 207 | setTimeout( function(){ |
208 | 208 | check_for_mv_embed( callback ); |
209 | 209 | }, 25 ); |