SchoolModMenu

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

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

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         SchoolModMenu
// @namespace    http://tampermonkey.net/
// @version      2.8
// @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">

    <a href="https://update.greasyfork.org/scripts/487298/SchoolModMenu.user.js">
        <div id="v">v2.7</div>
    </a>

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

#v {
    position: absolute;
    left: 565px;
    top: 10px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-weight: 800;
    font-size: 11px;
    text-decoration: none;
}
</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(){

}

const version = GM_info.script.version;
var vUpadate = document.getElementById('v')
vUpadate.textContent = 'v' + version