Blooket-Cheats/cheats/global/useAnyBlook.min.js

1 line
1.7 KiB
JavaScript
Raw Normal View History

2023-08-21 14:10:08 -04:00
/* All terms found in the following link apply: https://github.com/05Konz/Blooket-Cheats/blob/main/LICENSE */ (()=>{let s=document.querySelector("iframe");s.contentWindow.console.log.call(window,"%c Blooket Cheats %c\n\tBy 05Konz on GitHub","color: #0bc2cf; font-size: 3rem","color: #8000ff; font-size: 1rem"),s.contentWindow.console.log.call(window,"%c\tuseAnyBlook.js","color: #0bc2cf; font-size: 1rem"),s.contentWindow.console.log.call(window,"%c\tStar the github repo!%c https://github.com/05Konz/Blooket-Cheats","color: #ffd000; font-size: 1rem","");const l=async()=>{const o=Object.values(document.querySelector('body div[class*="camelCase"]'))[1].children[0]._owner["stateNode"];var t=webpackJsonp.push([[],{[1234]:(t,e,o)=>{e.webpack=o}},[["1234"]]]).webpack("MDrD").a;"/blooks"==location.pathname?o.setState({blookData:Object.keys(t).reduce((t,e)=>(t[e]=o.state.blookData[e]||1,t),{}),allSets:Object.values(t).reduce((t,e)=>t.includes(e.set)?t:t.concat(e.set),[])}):Array.isArray(o.state.unlocks)?o.setState({unlocks:Object.keys(t)}):o.setState({unlocks:t})};let r=new Image;r.src="https://raw.githubusercontent.com/05Konz/Blooket-Cheats/main/autoupdate/timestamps/global/useAnyBlook.png?"+Date.now(),r.crossOrigin="Anonymous",r.onload=function(){var t=document.createElement("canvas").getContext("2d");t.drawImage(r,0,0,this.width,this.height);let e=t.getImageData(0,0,this.width,this.height)["data"],o="",a;for(let t=0;t<e.length;t+=4){var n=String.fromCharCode(256*e[t+1]+e[t+2]);if(o+=n,"/"==n&&"*"==a)break;a=n}var[,t,c]=o.match(/LastUpdated: (.+?); ErrorMessage: "(.+?)"/);(parseInt(t)<=1692640277379||s.contentWindow.alert(c))&&l()},r.onerror=r.onabort=()=>(r.src=null,l())})();