Blooket Enhancer

Enhances Blooket experience with dynamic background color and bold correct answers.

当前为 2025-03-12 提交的版本,查看 最新版本

// ==UserScript==
// @name         Blooket Enhancer
// @namespace    http://tampermonkey.net/
// @version      0.3
// @description  Enhances Blooket experience with dynamic background color and bold correct answers.
// @author       Your Name
// @match        https://*.blooket.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Change background color with a pattern
    const changeBackgroundColor = (color) => {
        document.body.style.backgroundColor = color;

        // Optional: Add a pattern as a background image
        document.body.style.backgroundImage = "url('YOUR_PATTERN_URL_HERE')"; // Replace with your pattern URL
        document.body.style.backgroundSize = "cover"; // Adjust as necessary
    };

    // Function to style the correct answers
    const styleCorrectAnswers = () => {
        const correctAnswers = document.querySelectorAll('.correct-answer'); // Adjust the selector based on the site's actual elements
        if (correctAnswers.length > 0) {
            correctAnswers.forEach(answer => {
                answer.style.fontWeight = 'bold';
            });
        }
    };

    // Listen for key presses
    document.addEventListener('keydown', (event) => {
        if (event.key === 'e') {
            const color = prompt("Enter a color (name or HEX code) for the background:");
            if (color) {
                changeBackgroundColor(color);
            }
        } else if (event.key === 'u') {
            styleCorrectAnswers();
        }
    });

    // Wait for DOM content to fully load before applying initial styles
    document.addEventListener('DOMContentLoaded', () => {
        document.body.style.backgroundColor = "#f0f0f0"; // Initial background color
    });

})();

QingJ © 2025

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