SchoolModMenu

A mod menu to use at school ! Shortcuts / Apps / chatgpt include !

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

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         SchoolModMenu
// @namespace    http://tampermonkey.net/
// @version      2.3
// @description  A mod menu to use at school ! Shortcuts / Apps / chatgpt include !
// @author       dltrost
// @include      *
// @icon         https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant        none
// ==/UserScript==

const box = document.createElement('div')
box.innerHTML = `

<div id="box">
    <button id="home" onclick="home()" class="start">Home</button>
    <img src="https://cdn-icons-png.flaticon.com/512/45/45180.png" id="maison">

    <button id="apps" onclick="apps()" >Apps</button>
    <img src="https://www.svgrepo.com/show/334647/extension.svg" id="extention">

    <button id="keyboard" onclick="keys()" >Keys</button>
    <img src="https://cdn-icons-png.flaticon.com/512/68/68760.png" id="clavier">

    <button id="settings" onclick="test()" >Settings</button>
    <img src="https://cdn-icons-png.flaticon.com/512/15/15185.png" id="option">

</div>

<style>

#box {
    position: fixed;
    top: 20px;
    left: 50%;
    width: 80px;
    height: 12px;
    background: linear-gradient(139deg, rgb(255, 255, 255), rgb(255, 255, 255));
    border-radius: 5px;
    outline-color: rgb(255, 255, 255);
    filter: drop-shadow(0px 0px 10px rgba(0, 0, 0, 0.308));
    transform: translateX(-50%);
    transition: height 0.4s, width 0.8s, opacity 0.6s, border-radius 0.9s;
    overflow: hidden;
    opacity: 0.7;
}

#box:hover {
    width: 600px;
    height: 200px;
    opacity: 1;
    border-radius: 8px;
}

#home {
    position: absolute;
    top: 40px;
    left: 20px;
    width: 130px;
    height: 30px;
    outline: none;
    border: none;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: rgb(46, 46, 46);
    border-radius: 3px;
    transition-duration: 0.3s;
}

#home:hover, #apps:hover, #keyboard:hover, #settings:hover {
    background-color: rgba(0, 0, 0, 0.11);
}

#maison, #option, #extention, #clavier {
    pointer-events: none;
}

#maison {
    position: absolute;
    width: 15px;
    height: auto;
    left: 32px;
    top: 48px;
}

#apps {
    position: absolute;
    top: 70px;
    left: 20px;
    width: 130px;
    height: 30px;
    outline: none;
    border: none;
    background-color: rgba(0, 0, 0, 0.055);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: rgb(46, 46, 46);
    border-radius: 3px;
    transition-duration: 0.3s;
}

#extention {
    position: absolute;
    width: 15px;
    height: auto;
    left: 32px;
    top: 78px;
}

#keyboard {
    position: absolute;
    top: 100px;
    left: 20px;
    width: 130px;
    height: 30px;
    outline: none;
    border: none;
    background-color: rgba(0, 0, 0, 0.055);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: rgb(46, 46, 46);
    border-radius: 3px;
    transition-duration: 0.3s;
}

#clavier {
    position: absolute;
    width: 15px;
    height: auto;
    left: 32px;
    top: 108px;
}

#settings {
    position: absolute;
    top: 130px;
    left: 20px;
    width: 130px;
    height: 30px;
    border: none;
    background-color: rgba(0, 0, 0, 0.055);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 12px;
    font-weight: 800;
    color: rgb(46, 46, 46);
    border-radius: 3px;
    transition-duration: 0.3s;
}

#option {
    position: absolute;
    width: 15px;
    height: auto;
    left: 32px;
    top: 138px;
    transition-duration: 0.3s;
}

#box button.active {
    background-color: rgba(0, 0, 0, 0.11);
}

.start {
    background-color: rgba(0, 0, 0, 0.11);
}
</style>
`
document.body.appendChild(box);

const homepage = document.getElementById('home')
const appspage = document.getElementById('apps')
const keyboardpage = document.getElementById('keyboard')
const settingspage = document.getElementById('settings')

const buttons = document.querySelectorAll('#box button');

buttons.forEach(button => {
    button.addEventListener('click', function() {
        buttons.forEach(btn => btn.classList.remove('active'));
        buttons.forEach(btn => btn.classList.remove('start'));
        test()
        this.classList.add('active');
    });
});

function test() {
alert('hey')
}

(function() {
    'use strict';

    const SCRIPT_NAME = 'SchoolModMenu';
    const SCRIPT_URL = 'https://update.greasyfork.org/scripts/487298/SchoolModMenu.user.js'; // URL de votre script hébergé

    // Fonction pour récupérer la version actuelle du script
    function getCurrentVersion() {
        return GM_info.script.version;
    }

    // Fonction pour vérifier les mises à jour
    function checkForUpdates() {
        GM_xmlhttpRequest({
            method: 'GET',
            url: SCRIPT_URL,
            onload: function(response) {
                if (response.status === 200) {
                    const remoteVersion = response.responseText.match(/@version\s+([0-9.]+)/);
                    if (remoteVersion && remoteVersion[1]) {
                        const currentVersion = getCurrentVersion();
                        if (currentVersion < remoteVersion[1]) {
                            alert(`Nouvelle mise à jour disponible pour ${SCRIPT_NAME} !`);
                        }
                    }
                }
            }
        });
    }

    // Vérifie les mises à jour chaque fois que le script est exécuté
    checkForUpdates();

    // Vous pouvez également définir une minuterie pour vérifier périodiquement les mises à jour
    // setInterval(checkForUpdates, 24 * 60 * 60 * 1000); // Vérifier toutes les 24 heures, par exemple
})();