Blooket.Mod2

Get All blooks in blooket in the lobby to show off to your friends!

当前为 2022-10-25 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Blooket.Mod2
  3. // @namespace http://tampermonkey.net/
  4. // @version 2.0
  5. // @description Get All blooks in blooket in the lobby to show off to your friends!
  6. // @author You
  7. // @match https://play.blooket.com/play/lobby*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net
  9. // @grant none
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. (function(){
  14. function getStateNode(){
  15. for(let i of Object.keys(document.querySelector("#app>div>div"))){
  16. if(i.toString().includes("__reactEventHandlers")){
  17. for(let p of Object.values(document.querySelector("#app>div>div")[i].children.filter(n=>n))){
  18. if(p._owner&&p._owner.stateNode)return p._owner.stateNode
  19. }
  20. }
  21. }
  22. }
  23. function findByProp(p){
  24. return Object.values(webpackJsonp.push([
  25. [], {
  26. ['']: (_, a, b) => {
  27. a.cache = b.c
  28. },
  29. },
  30. [
  31. ['']
  32. ],
  33. ]).cache).find((x)=>{
  34. if(x.exports&&x.exports.a&&x.exports.a[p])return x.exports.a
  35. }).exports.a}
  36. getStateNode().state.unlocks = Object.keys(findByProp("Astronaut"));
  37. getStateNode().forceUpdate();
  38. })();