Blooket winner

Get every awnser in blooket correct!

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

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Blooket winner
// @namespace    http://tampermonkey.net/
// @version      6.0
// @description  Get every awnser in blooket correct!
// @author       You
// @match        https://play.blooket.com/play*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// @lisence      MIT
// ==/UserScript==

(function () {
  "use strict";
  try {
    const loop = setInterval(() => {
      const artsBody = document.querySelector("div[class*='arts__body']"),
        reactEventHandlerKey = Object.keys(artsBody).find((key) =>
          key.includes("__reactEventHandlers")
        ),
        target = artsBody[reactEventHandlerKey],
        path = document.location.pathname.split("/").filter((path) => path);
      if (
        path[1] == "gold" ||
        path[1] == "factory" ||
        path[1] == "racing" ||
        path[0] == "kingdom" ||
        path[1] == "start" ||
        path[1] == "battle" ||
        path[1] === "fishing" ||
        path[1] == "hack" ||
        path[0] === "defense" ||
        path[0] == "cafe"
      ) {
        target.children[1]._owner.memoizedState.question.correctAnswers =
          target.children[1]._owner.memoizedState.question.answers;
      } else if (path[1] == "battle-royale") {
        alert("Hack not supported on this game mode!");
        clearInterval(loop);
      } else if (path[1] == "classic") {
        target.children[1].memoizedProps.client.question.correctAnswers =
          target.children[1].memoizedProps.client.question.answers;
      }
    }, 100);
    alert("Hack activated!");
  } catch (err) {
    confirm(
      "An error occured, would you like to report this in the support discord server?"
    ) && window.open("(some broken discord server link)");
  }
})();