SchoolModMenu

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

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

  1. // ==UserScript==
  2. // @name SchoolModMenu
  3. // @namespace http://tampermonkey.net/
  4. // @version 3.0
  5. // @description A mod menu to use at school ! Shortcuts / Apps / chatgpt include !
  6. // @author dltrost
  7. // @include *
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. const box = document.createElement('div')
  13. box.innerHTML = `
  14.  
  15. <div id="box">
  16. <img class="fond" src="https://images.unsplash.com/photo-1448375240586-882707db888b?q=80&w=1000&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8MXx8fGVufDB8fHx8fA%3D%3D">
  17. <div class="background"></div>
  18.  
  19. <button id="home" onclick="home()" class="start">Home</button>
  20. <img src="https://cdn-icons-png.flaticon.com/512/45/45180.png" id="maison">
  21.  
  22. <button id="apps" onclick="apps()" >Apps</button>
  23. <img src="https://www.svgrepo.com/show/334647/extension.svg" id="extention">
  24.  
  25. <button id="keyboard" onclick="keys()" >Keys</button>
  26. <img src="https://cdn-icons-png.flaticon.com/512/68/68760.png" id="clavier">
  27.  
  28. <button id="settings" onclick="settings()" >Settings</button>
  29. <img src="https://cdn-icons-png.flaticon.com/512/15/15185.png" id="option">
  30. <a href="https://update.greasyfork.org/scripts/487298/SchoolModMenu.user.js">
  31. <div id="v">v2.7</div>
  32. </a>
  33.  
  34. <div>
  35. <div id="titlehome">What to do ?</div>
  36. <div id="texthome"> This mode allows you to <a class="color">navigate</a> and use <a class="color">applications with complete discretion</a> ! You can change <a class="color">application themes</a>, create <a class="color">keyboard shortcuts</a> in case of panic if a teacher arrives ! I let you discover ;)</div>
  37. </div>
  38. </div>
  39.  
  40. <style>
  41. #box {
  42. position: fixed;
  43. top: 20px;
  44. left: 50%;
  45. width: 80px;
  46. height: 12px;
  47. background: linear-gradient(139deg, rgb(255, 255, 255), rgb(255, 255, 255));
  48. border-radius: 5px;
  49. outline-color: rgb(255, 255, 255);
  50. filter: drop-shadow(0px 0px 10px rgba(0, 0, 0, 0.308));
  51. transform: translateX(-50%);
  52. transition: height 0.4s, width 0.8s, opacity 0.6s, border-radius 0.9s, background-image 0.9s, filter 0.9s;
  53. overflow: hidden;
  54. opacity: 0.7;
  55. }
  56.  
  57. #box:hover {
  58. width: 600px;
  59. height: 200px;
  60. opacity: 1;
  61. border-radius: 8px;
  62. }
  63.  
  64. #home {
  65. position: absolute;
  66. top: 40px;
  67. left: 20px;
  68. width: 130px;
  69. height: 30px;
  70. outline: none;
  71. border: none;
  72. background-color: rgba(255, 255, 255, 0.658);
  73. font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  74. font-size: 15px;
  75. font-weight: 800;
  76. color: rgb(46, 46, 46);
  77. transition-duration: 0.3s;
  78. border-top-left-radius: 3px;
  79. border-top-right-radius: 3px;
  80. }
  81.  
  82. #home:hover, #apps:hover, #keyboard:hover, #settings:hover {
  83. background-color: rgba(255, 255, 255, 0.568);
  84. }
  85.  
  86. #maison, #option, #extention, #clavier {
  87. pointer-events: none;
  88. }
  89.  
  90. #maison {
  91. position: absolute;
  92. width: 15px;
  93. height: auto;
  94. left: 32px;
  95. top: 48px;
  96. }
  97.  
  98. #apps {
  99. position: absolute;
  100. top: 70px;
  101. left: 20px;
  102. width: 130px;
  103. height: 30px;
  104. outline: none;
  105. border: none;
  106. background-color: rgba(255, 255, 255, 0.658);
  107. font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  108. font-size: 15px;
  109. font-weight: 800;
  110. color: rgb(46, 46, 46);
  111. transition-duration: 0.3s;
  112. }
  113.  
  114. #extention {
  115. position: absolute;
  116. width: 15px;
  117. height: auto;
  118. left: 32px;
  119. top: 78px;
  120. }
  121.  
  122. #keyboard {
  123. position: absolute;
  124. top: 100px;
  125. left: 20px;
  126. width: 130px;
  127. height: 30px;
  128. outline: none;
  129. border: none;
  130. background-color: rgba(255, 255, 255, 0.658);
  131. font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  132. font-size: 15px;
  133. font-weight: 800;
  134. color: rgb(46, 46, 46);
  135. transition-duration: 0.3s;
  136. }
  137.  
  138. #clavier {
  139. position: absolute;
  140. width: 15px;
  141. height: auto;
  142. left: 32px;
  143. top: 108px;
  144. }
  145.  
  146. #settings {
  147. position: absolute;
  148. top: 130px;
  149. left: 20px;
  150. width: 130px;
  151. height: 30px;
  152. border: none;
  153. background-color: rgba(255, 255, 255, 0.658);
  154. font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  155. font-size: 12px;
  156. font-weight: 800;
  157. color: rgb(46, 46, 46);
  158. transition-duration: 0.3s;
  159. border-bottom-right-radius: 3px;
  160. border-bottom-left-radius: 3px;
  161. }
  162.  
  163. #option {
  164. position: absolute;
  165. width: 15px;
  166. height: auto;
  167. left: 32px;
  168. top: 138px;
  169. transition-duration: 0.3s;
  170. }
  171.  
  172. #box button.active {
  173. background-color: rgba(255, 255, 255, 0.459);
  174. }
  175.  
  176. #v {
  177. position: absolute;
  178. left: 565px;
  179. top: 10px;
  180. font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  181. font-weight: 800;
  182. font-size: 11px;
  183. text-decoration: none;
  184. color: rgb(70, 203, 255);
  185. }
  186.  
  187. #titlehome, #texthome {
  188. font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  189. font-weight: 800;
  190. color: rgb(216, 216, 216);
  191. }
  192.  
  193. #titlehome {
  194. position: absolute;
  195. left: 330px;
  196. top: 48px;
  197. color: rgb(255, 255, 255) !important;
  198. }
  199.  
  200. #texthome {
  201. position: absolute;
  202. left: 170px;
  203. top: 75px;
  204. text-align: justify;
  205. font-size: 10px;
  206. max-width: 400px;
  207. }
  208.  
  209. .color {
  210. color: rgb(150, 168, 255) !important;
  211. }
  212.  
  213. .fond {
  214. position: absolute;
  215. width: 100%;
  216. height: auto;
  217. pointer-events: none;
  218. filter: blur(2px);
  219. }
  220.  
  221. .background {
  222. position: absolute;
  223. top: 40px;
  224. left: 160px;
  225. width: 424px;
  226. height: 119px;
  227. background-color: rgba(0, 0, 0, 0.253);
  228. border-radius: 3px;
  229. }
  230. </style>
  231. `
  232. document.body.appendChild(box);
  233.  
  234. const homepage = document.getElementById('home')
  235. const appspage = document.getElementById('apps')
  236. const keyboardpage = document.getElementById('keyboard')
  237. const settingspage = document.getElementById('settings')
  238. homepage.classList.add('active')
  239.  
  240. const buttons = document.querySelectorAll('#box button');
  241.  
  242. buttons.forEach(button => {
  243. button.addEventListener('click', function() {
  244. buttons.forEach(btn => btn.classList.remove('active'));
  245. buttons.forEach(btn => btn.classList.remove('start'));
  246. this.classList.add('active');
  247. });
  248. });
  249.  
  250. function test() {
  251.  
  252. }
  253.  
  254. const version = GM_info.script.version;
  255. var vUpdate = document.getElementById('v');
  256. vUpdate.textContent = 'v' + version;
  257.  
  258.  
  259.