Index: branches/js2-work/phase3/js/mwEmbed/tests/Add_Media_Wizard.html |
— | — | @@ -23,26 +23,24 @@ |
24 | 24 | 'import_url_mode' : 'remote_link', |
25 | 25 | 'remote_insert_description' : true, |
26 | 26 | //note selections in the textbox will take over the default query |
27 | | - 'default_query': 'fish', |
| 27 | + 'default_query' : 'fish', |
28 | 28 | |
29 | 29 | //we only enabled commons |
30 | 30 | //(since javascript includes from other servers would be problamatic ) in a default install |
31 | 31 | //** but you can set this to 'all' to pull from multiple repositories |
32 | | - 'enabled_providers' : 'all', |
| 32 | + 'enabled_providers' : [ 'wiki_commons', 'kaltura', 'archive_org', 'flickr', 'metavid' ], |
33 | 33 | |
34 | 34 | //the local wiki api url: |
35 | 35 | 'local_wiki_api_url': 'none' |
36 | 36 | } ); |
37 | 37 | } ); |
38 | 38 | }); |
39 | | - |
40 | 39 | </script> |
41 | 40 | </head> |
42 | 41 | <body> |
43 | 42 | <h3> Sample Add Media Wizard </h3> |
44 | 43 | |
45 | | -<a id="add_media_link" href="#">Add Media</a><br> |
46 | | -<b>note</b> only commons is enabled by default. For more options see source code.<br><br> |
| 44 | +<a id="add_media_link" href="#">Add Media</a><br><br> |
47 | 45 | <table border="1" width="800"> |
48 | 46 | <tr> |
49 | 47 | <td valign="top" width="50%" id="inline_append">Asset Output</td> |
Index: branches/js2-work/phase3/js/mwEmbed/modules/TimedText/mw.TimedText.js |
— | — | @@ -930,8 +930,8 @@ |
931 | 931 | // Try to load src via src attr: |
932 | 932 | if( this.getSrc() ){ |
933 | 933 | // Issue the direct load request ( if we can ) |
934 | | - if ( mw.parseUri( document.URL ).host != mw.parseUri( this.getSrc() ).host ){ |
935 | | - mw.log("Error: host mis-match: " + mw.parseUri( document.URL ).host != mw.parseUri( this.getSrc() ).host ) |
| 934 | + if ( !mw.isLocalDomain( this.getSrc() ) ){ |
| 935 | + mw.log("Error: cant load crossDomain src:" + this.getSrc() ) |
936 | 936 | return ; |
937 | 937 | } |
938 | 938 | $j.get( this.getSrc(), function( data ){ |
Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/searchLibs/kalturaSearch.js |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | /* |
3 | | - * Kaltura agragated search: |
| 3 | + * Kaltura aggregated search: |
4 | 4 | */ |
5 | 5 | |
6 | 6 | var kalturaSearch = function ( options ) { |
— | — | @@ -71,6 +71,7 @@ |
72 | 72 | // Update mapings: |
73 | 73 | result['poster'] = result['thumbnail']; |
74 | 74 | result['pSobj'] = _this; |
| 75 | + result['link'] = result[ 'item_details_page' ]; |
75 | 76 | |
76 | 77 | if( !result['titleKey'] && result['src'] ){ |
77 | 78 | result['titleKey'] = 'File:' + result['src'].split('/').pop(); |
Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/searchLibs/archiveOrgSearch.js |
— | — | @@ -10,11 +10,13 @@ |
11 | 11 | return this.init( iObj ); |
12 | 12 | } |
13 | 13 | archiveOrgSearch.prototype = { |
| 14 | + |
14 | 15 | // Archive.org constants: |
15 | 16 | downloadUrl : 'http://www.archive.org/download/', |
16 | 17 | detailsUrl : 'http://www.archive.org/details/', |
17 | | - /* |
18 | | - * Inititalize the archiveOrgSearch class. |
| 18 | + |
| 19 | + /** |
| 20 | + * Initialize the archiveOrgSearch class. |
19 | 21 | * archiveOrgSearch inherits the baseSearch class |
20 | 22 | */ |
21 | 23 | init:function( options ) { |
— | — | @@ -35,26 +37,28 @@ |
36 | 38 | */ |
37 | 39 | getSearchResults: function( search_query ) { |
38 | 40 | |
39 | | - // call parent for common initialisation: |
| 41 | + // call parent for common initialization: |
40 | 42 | this.parent_getSearchResults(); |
41 | 43 | |
42 | 44 | var _this = this; |
43 | | - mw.log( 'archive_org:getSearchResults for:' + search_query ); |
| 45 | + mw.log( 'archive_org:getSearchResults for:' + search_query + ' from: ' + this.provider.api_url ); |
44 | 46 | |
45 | 47 | |
46 | 48 | // For now force (Ogg video) & url based license |
47 | 49 | search_query += ' format:(Ogg video)'; |
48 | 50 | search_query += ' licenseurl:(http\\:\\/\\/*)'; |
49 | | - |
| 51 | + // Set the page number: |
| 52 | + var page_number = parseInt( this.provider.limit / this.provider.offset ) + 1; |
50 | 53 | // Build the request Object |
51 | 54 | var request = { |
52 | 55 | 'q': search_query, // just search for video atm |
53 | | - 'fl':"description,title,identifier,licenseurl,format,license,thumbnail", |
54 | | - 'wt':'json', |
| 56 | + 'fl[]':"description,title,identifier,licenseurl,format,license,thumbnail", |
| 57 | + 'fmt':'json', |
55 | 58 | 'rows' : this.provider.limit, |
56 | | - 'start' : this.provider.offset |
| 59 | + 'page' : page_number, |
| 60 | + 'xmlsearch' : 'Search' |
57 | 61 | } |
58 | | - $j.getJSON( this.provider.api_url + '?json.wrf=?', request, function( data ) { |
| 62 | + mw.getJSON( this.provider.api_url + '?json.wrf=?', request, function( data ) { |
59 | 63 | _this.addResults( data ); |
60 | 64 | _this.loading = false; |
61 | 65 | } ); |
— | — | @@ -97,43 +101,63 @@ |
98 | 102 | /** |
99 | 103 | * Get media metadata via a archive.org special entry point "avinfo" |
100 | 104 | * |
101 | | - * @param {Object} resource Resrouce to add metadata to. |
| 105 | + * @param {Object} resource Resource to add metadata to. |
102 | 106 | * @param {Function} callbcak Function called once extra metadata is added. |
103 | 107 | */ |
104 | | - addResourceInfoCallback:function( resource, callback ) { |
| 108 | + addResourceInfoCallback: function( resource, callback ) { |
105 | 109 | var _this = this; |
106 | | - $j.getJSON( |
107 | | - _this.downloadUrl + resource.resourceKey + '/format=Ogg+video&callback=?', |
| 110 | + mw.log( 'addResourceInfoCallback' ); |
| 111 | + mw.getJSON( |
| 112 | + _this.downloadUrl + resource.resourceKey + '/format=Ogg+video?callback=?', |
108 | 113 | { 'avinfo' : 1 }, |
109 | | - function( data ) { |
| 114 | + function( data ) { |
110 | 115 | if ( data['length'] ) |
111 | 116 | resource.duration = data['length']; |
112 | 117 | if ( data['width'] ) |
113 | 118 | resource.width = data['width']; |
114 | 119 | if ( data['height'] ) |
115 | | - resource.height = data['height']; |
116 | | - |
| 120 | + resource.height = data['height']; |
117 | 121 | callback(); |
118 | 122 | } ); |
119 | 123 | }, |
120 | 124 | |
121 | 125 | /** |
122 | 126 | * Returns html to embed a given result Object ( resource ) |
123 | | - * @param {Object} resrouce Resource to get embed HTML from. |
124 | | - * @parma {Object} options Options for the embeding. |
| 127 | + * @param {Object} resource Resource to get embed HTML from. |
| 128 | + * @parma {Object} options Options for the embedding. |
125 | 129 | */ |
126 | 130 | getEmbedHTML: function( resource , options ) { |
127 | 131 | mw.log( 'getEmbedHTML:: ' + resource.poster ); |
128 | 132 | if ( !options ) |
129 | 133 | options = { }; |
130 | | - var id_attr = ( options['id'] ) ? ' id = "' + options['id'] + '" ': ''; |
131 | | - if ( resource.duration ) { |
132 | | - var src = resource.src + '?t=0:0:0/' + mw.seconds2npt( resource.duration ); |
133 | | - } else { |
134 | | - var src = resource.src; |
| 134 | + |
| 135 | + var attributes = ( options['id'] ) ? ' id = "' + options['id'] + '" ': ''; |
| 136 | + |
| 137 | + // Add height width if we have it: |
| 138 | + if( resource.width ){ |
| 139 | + attributes += ' width="'+ parseInt( resource.width ) + '"'; |
135 | 140 | } |
136 | | - if ( resource.mime == 'application/ogg' || resource.mime == 'audio/ogg' || resource.mime == 'video/ogg' ) { |
137 | | - return '<video ' + id_attr + ' src="' + src + '" poster="' + resource.poster + '" type="video/ogg"></video>'; |
| 141 | + if( resource.height ){ |
| 142 | + attributes += ' height="' + parseInt( resource.height ) + '"'; |
138 | 143 | } |
| 144 | + // Add the src |
| 145 | + if( !resource.src ){ |
| 146 | + mw.log("Error: resource missing src"); |
| 147 | + }else{ |
| 148 | + attributes += ' src="' + resource.src + '"'; |
| 149 | + } |
| 150 | + // For now no resource.duration ( oggzchop is not very stable ) |
| 151 | + //if ( resource.duration ) { |
| 152 | + // var src = resource.src + '?t=0:0:0/' + mw.seconds2npt( resource.duration ); |
| 153 | + //} else { |
| 154 | + //var src = resource.src; |
| 155 | + //} |
| 156 | + var o =''; |
| 157 | + if ( resource.mime == 'application/ogg' || resource.mime == 'video/ogg' ) { |
| 158 | + return '<video poster="' + resource.poster + '" ' + attributes + |
| 159 | + ' type="video/ogg"></video>'; |
| 160 | + }else if( resource.mime == 'audio/ogg' ){ |
| 161 | + return '<audio ' + attributes + ' type="audio/ogg" ></audio>'; |
| 162 | + } |
139 | 163 | } |
140 | 164 | } |
Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/mw.RemoteSearchDriver.js |
— | — | @@ -186,10 +186,10 @@ |
187 | 187 | // Result cleared flag |
188 | 188 | results_cleared: false, |
189 | 189 | |
190 | | - // Caret position of target text area ( lazy initialised ) |
| 190 | + // Caret position of target text area ( lazy initialized ) |
191 | 191 | caretPos: null, |
192 | 192 | |
193 | | - // Text area value ( lazy initialised ) |
| 193 | + // Text area value ( lazy initialized ) |
194 | 194 | textboxValue: null, |
195 | 195 | |
196 | 196 | /** the default content providers list. |
— | — | @@ -274,7 +274,7 @@ |
275 | 275 | |
276 | 276 | }, |
277 | 277 | |
278 | | - /* |
| 278 | + /** |
279 | 279 | * Kaltura aggregated search |
280 | 280 | */ |
281 | 281 | 'kaltura': { |
— | — | @@ -294,7 +294,7 @@ |
295 | 295 | 'checked': 1, |
296 | 296 | 'homepage': 'http://www.archive.org/about/about.php', |
297 | 297 | |
298 | | - 'api_url': 'http://homeserver7.us.archive.org:8983/solr/select', |
| 298 | + 'api_url': 'http://www.archive.org/advancedsearch.php', |
299 | 299 | 'lib': 'archiveOrg', |
300 | 300 | 'local': false, |
301 | 301 | 'resource_prefix': 'AO_', |
— | — | @@ -471,9 +471,9 @@ |
472 | 472 | // Set the upload target name if unset |
473 | 473 | if ( _this.upload_api_target == 'local' |
474 | 474 | && ! _this.upload_api_name |
475 | | - && typeof wgSiteName != 'undefined' ) |
| 475 | + && typeof wgServer != 'undefined' ) |
476 | 476 | { |
477 | | - _this.upload_api_name = wgSiteName; |
| 477 | + _this.upload_api_name = mw.parseUri( wgServer ).host; |
478 | 478 | } else { |
479 | 479 | // Disable upload tab if no target is avaliable |
480 | 480 | this.content_providers[ 'upload' ].enabled = false; |
— | — | @@ -2036,7 +2036,7 @@ |
2037 | 2037 | gM( 'mwe-resource-needs-import', [resource.title, _this.upload_api_name] ) + |
2038 | 2038 | '</h3>' + |
2039 | 2039 | '<div id="rsd_preview_import_container" ' + |
2040 | | - 'style="position:absolute;width:50%;bottom:0px;left:5px;' + |
| 2040 | + 'style="position:absolute;width:49%;bottom:0px;left:5px;' + |
2041 | 2041 | 'overflow:auto;top:30px;">' + |
2042 | 2042 | |
2043 | 2043 | // Get embedHTML with small thumb: |
Index: branches/js2-work/phase3/js/mwEmbed/modules/EmbedPlayer/mw.EmbedPlayer.js |
— | — | @@ -1786,7 +1786,7 @@ |
1787 | 1787 | mw.log( 'f:getNextPrevLinks' ); |
1788 | 1788 | var anno_track_url = null; |
1789 | 1789 | var _this = this; |
1790 | | - // check for annoative track |
| 1790 | + // Check for annotative track |
1791 | 1791 | $j.each( this.mediaElement.sources, function( inx, n ) { |
1792 | 1792 | if ( n.mime_type == 'text/cmml' ) { |
1793 | 1793 | if ( n.id == 'Anno_en' ) { |
— | — | @@ -1830,16 +1830,11 @@ |
1831 | 1831 | } else { |
1832 | 1832 | mw.getMvJsonUrl( new_anno_track_url, function( cmml_data ) { |
1833 | 1833 | mw.log( 'raw response: ' + cmml_data ); |
1834 | | - if ( typeof cmml_data == 'string' ) { |
1835 | | - var parser = new DOMParser(); |
1836 | | - mw.log( 'Parse CMML data:' + cmml_data ); |
1837 | | - cmml_data = parser.parseFromString( cmml_data, "text/xml" ); |
1838 | | - } |
1839 | 1834 | // init cmmlData |
1840 | 1835 | if ( !_this.cmmlData ) |
1841 | 1836 | _this.cmmlData = { }; |
1842 | | - // grab all metadata and put it into the cmmlData: |
1843 | | - $j.each( cmml_data.getElementsByTagName( 'clip' ), function( inx, clip ) { |
| 1837 | + // Grab all metadata and put it into the cmmlData: |
| 1838 | + $j(cmml_data).find( 'clip' ).each( function( inx, clip ) { |
1844 | 1839 | _this.cmmlData[ $j( clip ).attr( "id" ) ] = { |
1845 | 1840 | 'start_time_sec':mw.npt2seconds( $j( clip ).attr( "start" ).replace( 'npt:', '' ) ), |
1846 | 1841 | 'end_time_sec':mw.npt2seconds( $j( clip ).attr( "end" ).replace( 'npt:', '' ) ), |
Index: branches/js2-work/phase3/js/mwEmbed/modules/EmbedPlayer/javaEmbed.js |
— | — | @@ -49,8 +49,8 @@ |
50 | 50 | // @@todo we should have src property in our base embed object |
51 | 51 | var mediaSrc = this.getSrc(); |
52 | 52 | |
53 | | - if ( mediaSrc.indexOf( '://' ) != -1 & mw.parseUri( document.URL ).host != mw.parseUri( mediaSrc ).host ) { |
54 | | - if ( window.cortadoDomainLocations[mw.parseUri( mediaSrc ).host] ) { |
| 53 | + if ( mediaSrc.indexOf( '://' ) != -1 & !mw.isLocalDomain( mediaSrc ) ) { |
| 54 | + if ( window.cortadoDomainLocations[ mw.parseUri( mediaSrc ).host ] ) { |
55 | 55 | applet_loc = window.cortadoDomainLocations[mw.parseUri( mediaSrc ).host]; |
56 | 56 | } else { |
57 | 57 | applet_loc = 'http://theora.org/cortado.jar'; |
Index: branches/js2-work/phase3/js/mwEmbed/modules/Sequencer/mw.Sequencer.js |
— | — | @@ -885,7 +885,7 @@ |
886 | 886 | } ); |
887 | 887 | |
888 | 888 | // Upload clipboard to the server (if possible) |
889 | | - if ( mw.parseUri( document.URL ).host != mw.parseUri( _this.plObj.interface_url ).host ) { |
| 889 | + if ( ! mw.isLocalDomain( _this.plObj.interface_url )) { |
890 | 890 | mw.log( 'error: presently we can\'t copy clips across domains' ); |
891 | 891 | } else { |
892 | 892 | // FIXME we need to add an api entry point to store a "clipboard" |
Index: branches/js2-work/phase3/js/mwEmbed/modules/ApiProxy/mw.proxy.js |
— | — | @@ -96,7 +96,7 @@ |
97 | 97 | $.proxy.client_frame_path = wgServer + wgScriptPath + '/js/mwEmbed/libMwApi/NestedCallbackIframe.html'; |
98 | 98 | } |
99 | 99 | |
100 | | - if ( mw.parseUri( $.proxy.server_frame ).host == mw.parseUri( document.URL ).host ) { |
| 100 | + if ( mw.isLocalDomain( $.proxy.server_frame ) ) { |
101 | 101 | mw.log( "Error: trying to proxy local domain? " ); |
102 | 102 | return false; |
103 | 103 | } |
Index: branches/js2-work/phase3/js/mwEmbed/mwEmbed.js |
— | — | @@ -1271,20 +1271,21 @@ |
1272 | 1272 | * API Helper functions |
1273 | 1273 | */ |
1274 | 1274 | |
1275 | | - /* |
1276 | | - * Get mediaWiki JSON a wrapper for jQuery getJSON: |
| 1275 | + /** |
| 1276 | + * mediaWiki JSON a wrapper for jQuery getJSON: |
1277 | 1277 | * $j.getJSON( url, [data], [callback] ) |
1278 | 1278 | * |
1279 | 1279 | * The mediaWiki version lets you skip the url part |
1280 | 1280 | * mw.getJSON( [url], data, callback ); |
1281 | 1281 | * |
1282 | | - * Lets you assume a few options: |
| 1282 | + * Lets you assume a few things: |
1283 | 1283 | * url is optional |
1284 | 1284 | * ( If the first argument is not a string we assume a local mediaWiki api request ) |
1285 | 1285 | * callback parameter is not needed we setup the callback automatically |
1286 | 1286 | * url param 'action'=>'query' is assumed ( if not set to something else in the "data" param |
1287 | 1287 | * format is set to "json" automatically |
1288 | 1288 | * automatically issues request over "POST" if action={postActions} |
| 1289 | + * ~soon~ will setup apiProxy where needed. |
1289 | 1290 | * |
1290 | 1291 | * @param {Mixed} url or data request |
1291 | 1292 | * @param {Mixed} data or callback |
— | — | @@ -1327,22 +1328,25 @@ |
1328 | 1329 | |
1329 | 1330 | mw.log("run getJSON: " + url + ' data: ' + data['action'] ); |
1330 | 1331 | |
| 1332 | + // Check if we need to setup proxy or do the request as a "post" |
1331 | 1333 | if( $j.inArray( data['action'], mw.getConfig( 'apiPostActions' ) ) != -1 ){ |
1332 | 1334 | if( ! mw.isLocalDomain( url ) ){ |
1333 | | - mw.log( "Error:: should setup proxy here" ); |
| 1335 | + mw.log( "Error:: Do setup proxy here" ); |
| 1336 | + return ; |
| 1337 | + }else{ |
| 1338 | + $j.post( url, data, callback, 'json'); |
| 1339 | + return ; |
1334 | 1340 | } |
1335 | | - $j.post( url, data, callback, 'json'); |
1336 | | - }else{ |
1337 | | - //If cross domain setup a callback: |
1338 | | - if( ! mw.isLocalDomain( url ) ){ |
1339 | | - if( url.indexOf( 'callback=' ) == -1 || data[ 'callback' ] == -1 ){ |
1340 | | - // jQuery specific: ( second ? is replaced with the callback ) |
1341 | | - url += ( url.indexOf('?') == -1 ) ? '?callback=?' : '&callback=?'; |
1342 | | - } |
1343 | | - } |
1344 | | - // Pass off the jQuery getJSON request: |
1345 | | - $j.getJSON( url, data, callback ); |
1346 | | - } |
| 1341 | + } |
| 1342 | + //If cross domain setup a callback: |
| 1343 | + if( ! mw.isLocalDomain( url ) ){ |
| 1344 | + if( url.indexOf( 'callback=' ) == -1 || data[ 'callback' ] == -1 ){ |
| 1345 | + // jQuery specific: ( second ? is replaced with the callback ) |
| 1346 | + url += ( url.indexOf('?') == -1 ) ? '?callback=?' : '&callback=?'; |
| 1347 | + } |
| 1348 | + } |
| 1349 | + // Pass off the jQuery getJSON request: |
| 1350 | + $j.getJSON( url, data, callback ); |
1347 | 1351 | } |
1348 | 1352 | |
1349 | 1353 | /** |
— | — | @@ -1366,9 +1370,13 @@ |
1367 | 1371 | } |
1368 | 1372 | |
1369 | 1373 | /** |
1370 | | - * Checks if the url is a request for the local domain |
| 1374 | + * Check if the url is a request for the local domain |
1371 | 1375 | * relative paths are "local" domain |
1372 | 1376 | * @param {String} url Url for local domain |
| 1377 | + * @return |
| 1378 | + * true if url domain is local or relative |
| 1379 | + * false if the domain is |
| 1380 | + * @type {Boolean} |
1373 | 1381 | */ |
1374 | 1382 | mw.isLocalDomain = function( url ) { |
1375 | 1383 | if( mw.parseUri( document.URL ).host == mw.parseUri( url ).host || |
— | — | @@ -2270,8 +2278,8 @@ |
2271 | 2279 | else if (document.styleSheets[0].rules) |
2272 | 2280 | rules = document.styleSheets[i].rules |
2273 | 2281 | for(var j=0 ; j < rules.length ; j++ ){ |
2274 | | - var rule = rules[j].selectorText; |
2275 | | - if( rule.indexOf( styleRule ) != -1 ){ |
| 2282 | + var rule = rules[j].selectorText; |
| 2283 | + if( rule && rule.indexOf( styleRule ) != -1 ){ |
2276 | 2284 | return true; |
2277 | 2285 | } |
2278 | 2286 | } |
— | — | @@ -2316,13 +2324,13 @@ |
2317 | 2325 | |
2318 | 2326 | |
2319 | 2327 | |
2320 | | -// Load in js2 stopgap into proper location: |
| 2328 | +// Load in js2 stopgap global msgs into proper location: |
2321 | 2329 | if ( typeof gMsg != 'undefined' ) { |
2322 | 2330 | mw.addMessages( gMsg ) |
2323 | 2331 | } |
2324 | 2332 | |
2325 | | -// Set gM shortcut: |
2326 | | -var gM = mw.getMsg; |
| 2333 | +// Set global gM shortcut: |
| 2334 | +window['gM'] = mw.getMsg; |
2327 | 2335 | |
2328 | 2336 | // Setup legacy global shortcuts: |
2329 | 2337 | var loadRS = mw.lang.loadRS; |
— | — | @@ -2445,6 +2453,7 @@ |
2446 | 2454 | } |
2447 | 2455 | })(domReadyCheck); |
2448 | 2456 | // As a backup check if "body" is not null ( for dynamic inserts ) |
| 2457 | +// ( mw.domReady ignores multiple ready calls ) |
2449 | 2458 | var mwCheckBody = function(){ |
2450 | 2459 | if( document.getElementsByTagName('body')[0] ){ |
2451 | 2460 | mw.domReady(); |
— | — | @@ -2574,29 +2583,3 @@ |
2575 | 2584 | } )( jQuery ); |
2576 | 2585 | } |
2577 | 2586 | |
2578 | | -/** |
2579 | | -* Utility functions that override globals |
2580 | | -* |
2581 | | -* Will be depreciated once we move all XML parsing to jQuery calls |
2582 | | -*/ |
2583 | | - |
2584 | | -if ( typeof DOMParser == "undefined" ) { |
2585 | | - DOMParser = function () { } |
2586 | | - DOMParser.prototype.parseFromString = function ( str, contentType ) { |
2587 | | - if ( typeof ActiveXObject != "undefined" ) { |
2588 | | - var d = new ActiveXObject( "MSXML.DomDocument" ); |
2589 | | - d.loadXML( str ); |
2590 | | - return d; |
2591 | | - } else if ( typeof XMLHttpRequest != "undefined" ) { |
2592 | | - var req = new XMLHttpRequest; |
2593 | | - req.open( "GET", "data:" + ( contentType || "application/xml" ) + |
2594 | | - ";charset=utf-8," + encodeURIComponent( str ), false ); |
2595 | | - if ( req.overrideMimeType ) { |
2596 | | - req.overrideMimeType( contentType ); |
2597 | | - } |
2598 | | - req.send( null ); |
2599 | | - return req.responseXML; |
2600 | | - } |
2601 | | - } |
2602 | | -} |
2603 | | - |
Index: branches/js2-work/phase3/js/editPage.js |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | 'default_query': wgTitle, |
17 | 17 | 'target_title': wgPageName, |
18 | 18 | // Here we can setup the content provider overrides |
19 | | - 'enabled_providers':['wiki_commons'], |
| 19 | + 'enabled_providers': ['wiki_commons'], |
20 | 20 | // The local wiki API URL: |
21 | 21 | 'local_wiki_api_url': wgServer + wgScriptPath + '/api.php' |
22 | 22 | }; |