Highlight Blooket Answers

View All The Correct Answers on Blooket! tags:blooket hack, blooket hacks, blooket cheats

  1. // ==UserScript==
  2. // @name Highlight Blooket Answers
  3. // @namespace http://gf.qytechs.cn/
  4. // @version 14
  5. // @description View All The Correct Answers on Blooket! tags:blooket hack, blooket hacks, blooket cheats
  6. // @match https://*.blooket.com/*
  7. // @icon https://static.wikia.nocookie.net/blooket/images/1/11/Wiseowlsvg.svg
  8. // @grant GM_registerMenuCommand
  9. // @grant GM_getValue
  10. // @grant GM_setValue
  11. // @grant GM_addStyle
  12. // @license MIT
  13. // ==/UserScript==
  14.  
  15. (() => {
  16. // Initialize settings
  17. let useArialFont = GM_getValue('useArialFont', false);
  18. let highlightInterval;
  19.  
  20. // Add minimal styles
  21. GM_addStyle(`
  22. .blooket-highlight-status {
  23. position: fixed;
  24. bottom: 10px;
  25. right: 10px;
  26. background: rgba(0,0,0,0.7);
  27. color: white;
  28. padding: 5px 10px;
  29. border-radius: 5px;
  30. font-family: Nunito,sans-serif;
  31. font-size: 12px;
  32. z-index: 9999;
  33. }
  34. `);
  35.  
  36. // Create status indicator
  37. function createStatusIndicator() {
  38. const status = document.createElement('div');
  39. status.className = 'blooket-highlight-status';
  40. status.textContent = `Highlight Mode: ${useArialFont ? 'Italic' : 'Normal'}`;
  41. document.body.appendChild(status);
  42. return status;
  43. }
  44.  
  45. function updateHighlights() {
  46. try {
  47. const { stateNode: { state, props } } = Object.values((function react(r = document.querySelector("body>div")) {
  48. return Object.values(r)[1]?.children?.[0]?._owner.stateNode ? r : react(r.querySelector(":scope>div"))
  49. })())[1].children[0]._owner;
  50.  
  51. [...document.querySelectorAll(`[class*="answerContainer"]`)].forEach((answer, i) => {
  52. const isCorrect = (state.question || props.client.question).correctAnswers.includes((state.question || props.client.question).answers[i]);
  53.  
  54. // Reset styles first
  55.  
  56. if (useArialFont) {
  57. // Font style mode
  58. if (isCorrect) {
  59. answer.style.fontFamily = "Arial, sans-serif";
  60. answer.style.fontStyle = "italic";
  61. }
  62. } else {
  63. // Color highlight mode
  64. answer.style.backgroundColor = '';
  65. answer.style.fontFamily = '';
  66. answer.style.fontWeight = '';
  67. answer.style.fontStyle = '';
  68.  
  69. if (isCorrect) {
  70. answer.style.backgroundColor = "rgb(0, 207, 119)";
  71. } else {
  72. answer.style.backgroundColor = "rgb(189, 15, 38)";
  73. }
  74. }
  75. });
  76. } catch (e) {
  77. // Silently handle errors that occur when game elements aren't available
  78. }
  79. }
  80.  
  81. function startHighlighting() {
  82. if (highlightInterval) clearInterval(highlightInterval);
  83. highlightInterval = setInterval(updateHighlights, 500);
  84. }
  85.  
  86. // Initialize
  87. const statusIndicator = createStatusIndicator();
  88. startHighlighting();
  89.  
  90. // Register simple toggle command
  91. GM_registerMenuCommand(`Toggle Highlight Mode`, () => {
  92. useArialFont = !useArialFont;
  93. GM_setValue('useArialFont', useArialFont);
  94. statusIndicator.textContent = `Highlight Mode: ${useArialFont ? 'Italic' : 'Normal'}`;
  95. updateHighlights();
  96. });
  97. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址