// ==UserScript==
// @name SchoolModMenu
// @namespace http://tampermonkey.net/
// @version 2.4
// @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() {
'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
})();