This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| !function(){const e={getInfo:function(){return{id:"sound",name:"Sound",color1:"#CF63CF",color2:"#C94FC9",color3:"#BD3CBD",blocks:[{opcode:"getCurrentSound",blockType:"boolean",text:"sound"}]}},getCurrentSound:function(){try{if("undefined"!=typeof Scratch&&Scratch.vm&&Scratch.vm.runtime){const t=Scratch.vm.runtime.audioEngine;if(t&&t.sounds){const s=Object.values(t.sounds).filter(e=>e&&e.isPlaying);return s.length>0?s[0].name||"Unknown":"None"}}}catch(e){}return"None"}};"undefined"!=typeof Scratch&&Scratch.extensions?Scratch.extensions.register(e):setTimeout((){"undefined"!=typeof Scratch&&Scratch.extensions&&Scratch.extensions.register(e)},100)}(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| !function(){class e{constructor(){this.currentSound="None",this.setupTracking()}setupTracking(){try{if("undefined"!=typeof Scratch&&Scratch.vm&&Scratch.vm.runtime){const t=Scratch.vm.runtime.startSound;Scratch.vm.runtime.startSound=function(s,o){return window.soundExtension&&(window.soundExtension.currentSound=s||"Unknown"),t.call(this,s,o)}}}catch(e){}}getInfo(){return{id:"sound",name:"Sound",color1:"#CF63CF",color2:"#C94FC9",color3:"#BD3CBD",blocks:[{opcode:"getCurrentSound",blockType:"boolean",text:"sound"}]}}getCurrentSound(){return this.currentSound}}window.soundExtension=new e,"undefined"!=typeof Scratch&&Scratch.extensions?Scratch.extensions.register(window.soundExtension):setTimeout(()=>{"undefined"!=typeof Scratch&&Scratch.extensions&&Scratch.extensions.register(window.soundExtension)},100)}(); |