Blooket and other school hacks

A basic script to display a menu on a webpage.

目前為 2024-10-02 提交的版本,檢視 最新版本

// ==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);

})();