ThatFruedDued / blooket-utility

The most advanced, compatible, and open Blooket utility.
75 stars 71 forks source link

Can I have have the source code? #1

Closed TheFinality closed 3 years ago

TheFinality commented 3 years ago

This seems like compiled typescript, can I have the source code to make some stuff? I will open pull requests.

ThatFruedDued commented 3 years ago

To make this hack work, I modify Blooket's code on their website. This code has already been compiled, and I do not have access to the source code. However, I still manage to get by modifying Blooket's compiled code. This is located in the blooket.js file under scripts. Everything I wrote is still completely in its source, like index.js. I also wish we had access to Blooket's source code, but this is just the way it is.

TheFinality commented 3 years ago

So you edited the code by just doing it, no deobfuscating or anything?

ThatFruedDued commented 3 years ago

The Blooket code is not obfuscated, it is minified and packaged by Webpack. I made a simple function to extract the code from the webpackJsonp object on the webpage, ran the resulting code through a JavaScript formatter, and pasted the final code into the scripts/blooket.js file. I can then edit this script and inject it using the script found at index.js.

If you are interested in contributing, my goal is to make no changes to the Blooket source unless a preference is enabled. I get preferences through the getPref function that is automatically patched into the website.