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 2.6
  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. <button id="home" onclick="home()" class="start">Home</button>
  17. <img src="https://cdn-icons-png.flaticon.com/512/45/45180.png" id="maison">
  18.  
  19. <button id="apps" onclick="apps()" >Apps</button>
  20. <img src="https://www.svgrepo.com/show/334647/extension.svg" id="extention">
  21.  
  22. <button id="keyboard" onclick="keys()" >Keys</button>
  23. <img src="https://cdn-icons-png.flaticon.com/512/68/68760.png" id="clavier">
  24.  
  25. <button id="settings" onclick="test()" >Settings</button>
  26. <img src="https://cdn-icons-png.flaticon.com/512/15/15185.png" id="option">
  27.  
  28. </div>
  29.  
  30. <style>
  31.  
  32. #box {
  33. position: fixed;
  34. top: 20px;
  35. left: 50%;
  36. width: 80px;
  37. height: 12px;
  38. background: linear-gradient(139deg, rgb(255, 255, 255), rgb(255, 255, 255));
  39. border-radius: 5px;
  40. outline-color: rgb(255, 255, 255);
  41. filter: drop-shadow(0px 0px 10px rgba(0, 0, 0, 0.308));
  42. transform: translateX(-50%);
  43. transition: height 0.4s, width 0.8s, opacity 0.6s, border-radius 0.9s;
  44. overflow: hidden;
  45. opacity: 0.7;
  46. }
  47.  
  48. #box:hover {
  49. width: 600px;
  50. height: 200px;
  51. opacity: 1;
  52. border-radius: 8px;
  53. }
  54.  
  55. #home {
  56. position: absolute;
  57. top: 40px;
  58. left: 20px;
  59. width: 130px;
  60. height: 30px;
  61. outline: none;
  62. border: none;
  63. font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  64. font-size: 15px;
  65. font-weight: 800;
  66. color: rgb(46, 46, 46);
  67. border-radius: 3px;
  68. transition-duration: 0.3s;
  69. }
  70.  
  71. #home:hover, #apps:hover, #keyboard:hover, #settings:hover {
  72. background-color: rgba(0, 0, 0, 0.11);
  73. }
  74.  
  75. #maison, #option, #extention, #clavier {
  76. pointer-events: none;
  77. }
  78.  
  79. #maison {
  80. position: absolute;
  81. width: 15px;
  82. height: auto;
  83. left: 32px;
  84. top: 48px;
  85. }
  86.  
  87. #apps {
  88. position: absolute;
  89. top: 70px;
  90. left: 20px;
  91. width: 130px;
  92. height: 30px;
  93. outline: none;
  94. border: none;
  95. background-color: rgba(0, 0, 0, 0.055);
  96. font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  97. font-size: 15px;
  98. font-weight: 800;
  99. color: rgb(46, 46, 46);
  100. border-radius: 3px;
  101. transition-duration: 0.3s;
  102. }
  103.  
  104. #extention {
  105. position: absolute;
  106. width: 15px;
  107. height: auto;
  108. left: 32px;
  109. top: 78px;
  110. }
  111.  
  112. #keyboard {
  113. position: absolute;
  114. top: 100px;
  115. left: 20px;
  116. width: 130px;
  117. height: 30px;
  118. outline: none;
  119. border: none;
  120. background-color: rgba(0, 0, 0, 0.055);
  121. font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  122. font-size: 15px;
  123. font-weight: 800;
  124. color: rgb(46, 46, 46);
  125. border-radius: 3px;
  126. transition-duration: 0.3s;
  127. }
  128.  
  129. #clavier {
  130. position: absolute;
  131. width: 15px;
  132. height: auto;
  133. left: 32px;
  134. top: 108px;
  135. }
  136.  
  137. #settings {
  138. position: absolute;
  139. top: 130px;
  140. left: 20px;
  141. width: 130px;
  142. height: 30px;
  143. border: none;
  144. background-color: rgba(0, 0, 0, 0.055);
  145. font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  146. font-size: 12px;
  147. font-weight: 800;
  148. color: rgb(46, 46, 46);
  149. border-radius: 3px;
  150. transition-duration: 0.3s;
  151. }
  152.  
  153. #option {
  154. position: absolute;
  155. width: 15px;
  156. height: auto;
  157. left: 32px;
  158. top: 138px;
  159. transition-duration: 0.3s;
  160. }
  161.  
  162. #box button.active {
  163. background-color: rgba(0, 0, 0, 0.11);
  164. }
  165.  
  166. .start {
  167. background-color: rgba(0, 0, 0, 0.11);
  168. }
  169. </style>
  170. `
  171. document.body.appendChild(box);
  172.  
  173. const homepage = document.getElementById('home')
  174. const appspage = document.getElementById('apps')
  175. const keyboardpage = document.getElementById('keyboard')
  176. const settingspage = document.getElementById('settings')
  177.  
  178. const buttons = document.querySelectorAll('#box button');
  179.  
  180. buttons.forEach(button => {
  181. button.addEventListener('click', function() {
  182. buttons.forEach(btn => btn.classList.remove('active'));
  183. buttons.forEach(btn => btn.classList.remove('start'));
  184. test()
  185. this.classList.add('active');
  186. });
  187. });
  188.  
  189. function test(){
  190.  
  191. }
  192.