Changes

m
sm2 is ok now. but player still doesnt work.
Line 1: Line 1: −
console.log('sm2 loaded');
   
$(window).load(function(){
 
$(window).load(function(){
console.log('sm2 init');
  −
/**
  −
* Prepares file links so that SoundManager 2 can modify them.
  −
* @see [[Template:sm2]]
  −
* @see https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/SoundManager2Button.git;a=blob;f=SoundManager2Button.php;h=4a6b8c571b818afdd69cbcfd03cd774997eebc7a;hb=refs/heads/REL1_20#l104
  −
**/
  −
$('a.internal','span.audio_button',mw.util.$content).attr({'class':'sm2_button','title':'Play'}).text('Play').unwrap();
     −
if (mw.loader.getState('ext.wfSoundManager2Button') === null) {
+
$('a.internal','span.audio_button',mw.util.$content)
console.log('sm2 install');
+
.attr({'class':'sm2_button','title':'Play'})
/**
+
.text('Play')
* Complex code that is added upon "SoundManager 2" (SM2) installation.
+
.unwrap();
* Obsolete when SM2 gets installed (because SoundManager2Button adds this code)
+
 
*
+
if (mw.loader.getState('ext.wfSoundManager2Button') === null) {
* https://www.mediawiki.org/wiki/Extension:SoundManager2Button
  −
* http://schillmania.com/projects/soundmanager2/
  −
* @version 0.3.3 (REL1_20)
  −
**/
      
mw.loader.implement("ext.wfSoundManager2Button",function($){(function(window){var soundManager=null;function SoundManager(smURL,smID){this.setupOptions={'url':(smURL||null),'flashVersion':8,'debugMode':true,'debugFlash':false,'useConsole':true,'consoleOnly':true,'waitForWindowLoad':false,'bgColor':'#ffffff','useHighPerformance':false,'flashPollingInterval':null,'html5PollingInterval':null,'flashLoadTimeout':1000,'wmode':null,'allowScriptAccess':'always','useFlashBlock':false,'useHTML5Audio':true,'html5Test':/^(probably|maybe)$/i,'preferFlash':true,'noSWFCache':false};this.defaultOptions={'autoLoad':false,'autoPlay':false,'from':null,'loops':1,'onid3':null,'onload':null,'whileloading':null,'onplay':null,'onpause':null,'onresume':null,'whileplaying':null,'onposition':null,'onstop':null,'onfailure':null,'onfinish':null,'multiShot':true,'multiShotEvents':false,'position':null,'pan':0,'stream':true,'to':null,'type':null,'usePolicyFile':false,'volume':100};this.flash9Options={'isMovieStar':
 
mw.loader.implement("ext.wfSoundManager2Button",function($){(function(window){var soundManager=null;function SoundManager(smURL,smID){this.setupOptions={'url':(smURL||null),'flashVersion':8,'debugMode':true,'debugFlash':false,'useConsole':true,'consoleOnly':true,'waitForWindowLoad':false,'bgColor':'#ffffff','useHighPerformance':false,'flashPollingInterval':null,'html5PollingInterval':null,'flashLoadTimeout':1000,'wmode':null,'allowScriptAccess':'always','useFlashBlock':false,'useHTML5Audio':true,'html5Test':/^(probably|maybe)$/i,'preferFlash':true,'noSWFCache':false};this.defaultOptions={'autoLoad':false,'autoPlay':false,'from':null,'loops':1,'onid3':null,'onload':null,'whileloading':null,'onplay':null,'onpause':null,'onresume':null,'whileplaying':null,'onposition':null,'onstop':null,'onfailure':null,'onfinish':null,'multiShot':true,'multiShotEvents':false,'position':null,'pan':0,'stream':true,'to':null,'type':null,'usePolicyFile':false,'volume':100};this.flash9Options={'isMovieStar':
Line 80: Line 68:  
},{});
 
},{});
   −
  }/* END if (mw.loader.getState('ext.wfSoundManager2Button') === null) */
+
  }
 
  mw.log('ext.wfSoundManager2Button: '+mw.loader.getState('ext.wfSoundManager2Button'));
 
  mw.log('ext.wfSoundManager2Button: '+mw.loader.getState('ext.wfSoundManager2Button'));
 
});
 
});
15

edits