Index: branches/js2-work/phase3/js/mwEmbed/remotes/mediaWiki.js |
— | — | @@ -4,7 +4,7 @@ |
5 | 5 | */ |
6 | 6 | var urlparts = getRemoteEmbedPath(); |
7 | 7 | var mwEmbedHostPath = urlparts[0]; |
8 | | -var mwRemoteVersion = 'r81'; |
| 8 | +var mwRemoteVersion = 'r82'; |
9 | 9 | var mwUseScriptLoader = true; |
10 | 10 | |
11 | 11 | //Log the mwRemote version ( will determin what version of js we get ) |
— | — | @@ -383,10 +383,16 @@ |
384 | 384 | function mwCheckForGadget(){ |
385 | 385 | mw.log('mwCheckForGadget'); |
386 | 386 | scripts = document.getElementsByTagName( 'script' ); |
| 387 | + // Check for document paramater withJS and ignore found gadget |
| 388 | + var withJS = getParamValue("withJS"); |
| 389 | + |
387 | 390 | for( var i = 0 ; i < scripts.length ; i ++){ |
388 | | - if ( scripts[i].src && |
389 | | - scripts[i].src.indexOf( 'MediaWiki:Gadget-mwEmbed.js' ) !== -1){ |
390 | | - mw.log('gadget already installed'); |
| 391 | + if ( |
| 392 | + scripts[i].src |
| 393 | + && scripts[i].src.indexOf( 'MediaWiki:Gadget-mwEmbed.js' ) !== -1 |
| 394 | + && !withJS |
| 395 | + ){ |
| 396 | + mw.log('gadget already installed: ' + scripts[i].src); |
391 | 397 | //gadget found / enabled |
392 | 398 | return true; |
393 | 399 | } |
— | — | @@ -428,7 +434,7 @@ |
429 | 435 | $j('#firstHeading').before( |
430 | 436 | $j('<div />') |
431 | 437 | .css({ |
432 | | - 'margin': '5px' |
| 438 | + 'margin': '10px' |
433 | 439 | }).html( |
434 | 440 | $gadgetBtn |
435 | 441 | ) |