Created
May 14, 2018 11:16
-
-
Save abeldantas/12d20bbf765fcecb1a44a31126b95e76 to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/sh | |
FILE=$(find . -name '*.asm.framework.unityweb' -exec basename {} +) | |
echo 'fixed '$FILE | |
mv $FILE $FILE.gz | |
gunzip $FILE.gz | |
gsed -i.bak 's#function _JS_Sound_Init(){try{window.AudioContext=window.AudioContext||window.webkitAudioContext;WEBAudio.audioContext=new AudioContext;WEBAudio.audioWebEnabled=1}catch(e){alert("Web Audio API is not supported in this browser")}}#function _JS_Sound_Init(){try{window.AudioContext=window.AudioContext||window.webkitAudioContext;WEBAudio.audioContext=new AudioContext();var tryToResumeAudioContext=function(){if(WEBAudio.audioContext.state==="suspended")WEBAudio.audioContext.resume();else{clearInterval(resumeInterval)}};var resumeInterval=setInterval(tryToResumeAudioContext,400);WEBAudio.audioWebEnabled=1}catch(e){alert("Web Audio API is not supported in this browser")}}#g' $FILE | |
rm $FILE.bak | |
gzip --best $FILE | |
mv $FILE.gz $FILE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment