Blooket and other school hacks

A basic script to display a menu on a webpage.

当前为 2024-10-02 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Blooket and other school hacks
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  A basic script to display a menu on a webpage.
// @author       MrSticker23
// @match        *://*/*
// @grant        none
// @license      MrSticker23
// ==/UserScript==

(function() {
    'use strict';

    // Create menu container
    const menu = document.createElement('div');
    menu.style.position = 'fixed';
    menu.style.top = '10px';
    menu.style.right = '10px';
    menu.style.backgroundColor = 'rgba(0, 0, 0, 0.7)';
    menu.style.color = 'white';
    menu.style.padding = '10px';
    menu.style.borderRadius = '5px';
    menu.style.zIndex = '1000';

    // Add title
    const title = document.createElement('h4');
    title.textContent = 'Menu';
    title.style.margin = '0 0 10px 0';
    menu.appendChild(title);

    // Add menu items (you can customize this section)
    const item1 = document.createElement('button');
    item1.textContent = 'Action 1';
    item1.style.marginBottom = '5px';
    item1.onclick = function() {
        alert('Action 1 triggered!');
    };
    menu.appendChild(item1);

    const item2 = document.createElement('button');
    item2.textContent = 'Action 2';
    item2.style.marginTop = '5px';
    item2.onclick = function() {
        alert('Action 2 triggered!');
    };
    menu.appendChild(item2);

    // Append the menu to the body
    document.body.appendChild(menu);

})();