-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathminified.js
1 lines (1 loc) · 2.76 KB
/
minified.js
1
new Promise(async(t,e)=>{Eu||zu||Hu||e("I couldn't find the game. Maybe try refreshing?"),console.log("GOOGLE DOODLE MOD LOADER\ncreated by cabalex for the 2021 Doodle Champion Island Games\nv0.2.0\n\nUpload your FNF song beatmap/mp3."),window.google.doodle.doodle_args.submitScoreUrl="";var[r]=await window.showOpenFilePicker({multiple:!1,types:[{description:"FNF Beatmaps",accept:{"application/json":[".json"]}}]});r=await r.getFile();var[s]=await window.showOpenFilePicker({multiple:!1,types:[{description:"FNF Songs",accept:{"audio/mpeg":[".mp3",".ogg"]}}]});s=await s.getFile(),console.log("Loading files...");var o=[],a=120,i=document.createElement("audio");i.setAttribute("id","tempModLoaderAudio");var n=new FileReader;n.onloadend=async function(r){if(r.target.readyState==FileReader.DONE){if("string"==typeof r.target.result){var c=JSON.parse(r.target.result);a=c.song.bpm;for(var l=[3,2,0,1],g=0;g<c.song.notes.length;g++){var p=c.song.notes[g];if(p.mustHitSection)for(var u=0;u<p.sectionNotes.length;u++){var d=p.sectionNotes[u];d[1]<4&&o.push({type:l[d[1]%4],time:d[0]})}else for(var u=0;u<p.sectionNotes.length;u++){var d=p.sectionNotes[u];d[1]>3&&o.push({type:l[d[1]%4],time:d[0]})}}o.sort((t,e)=>t.time-e.time),n.readAsArrayBuffer(s)}else{var $=new Blob([r.target.result],{type:"audio/mpeg"});i.src=URL.createObjectURL($),i.addEventListener("durationchange",async function(){o.push({type:10,time:1e3*i.duration});var r=document.getElementsByTagName("html")[0].innerHTML;let s=parseInt(r.split("/kitsune/rc")[1].split("/")[0]);switch(console.log("Running RC"+s+" - https://www.google.com/logos/2020/kitsune/rc"+s+"/kitsune20.html?hl=en"),s){case 1:A.C1.Ud.Sb=i.src,A.C1.Qc=1e3*i.duration;var n=zu.toString().replace(/.SPEED=[0-9.]*\}this/mg,".SPEED="+a+"}this");zu.prototype.constructor=Function("b",n.substr(12,n.length-13));break;case 2:A.E1.Rd.Tb=i.src,A.E1.Oc=1e3*i.duration;var n=Eu.toString().replace(/.SPEED=[0-9.]*\}this/mg,".SPEED="+a+"}this");Eu.prototype.constructor=Function("b",n.substr(12,n.length-13)),Du=o;break;case 3:A.I1.Rd.Tb=i.src,A.I1.Oc=1e3*i.duration;var n=Hu.toString().replace(/.SPEED=[0-9.]*\}this/mg,".SPEED="+a+"}this");Hu.prototype.constructor=Function("b",n.substr(12,n.length-13)),Du=o;break;case 4:case 5:case 6:A.K1.le.oc=i.src,A.K1.Sc=1e3*i.duration;var n=Hu.toString().replace(/.SPEED=[0-9.]*\}this/mg,".SPEED="+a+"}this");Hu.prototype.constructor=Function("b",n.substr(12,n.length-13)),Gu=o;break;case 7:A.K6.fe.Jc=i.src,A.K6.Bd=1e3*i.duration;var n=Mu.toString().replace(/.SPEED=[0-9.]*\}this/mg,".SPEED="+a+"}this");Mu.prototype.constructor=Function("b",n.substr(12,n.length-13)),Lu=o;break;default:console.error("Error: Unknown rc type? RC"+s),e()}console.log("Finished loading successfully! Visit the main Artistic Swimming minigame to play."),t()},!1)}}},n.readAsText(r)});