Greasy Fork 还支持 简体中文。

Sigmally Mod

A sigmally Mod

目前為 2022-12-23 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name Sigmally Mod
  3. // @version 1.8
  4. // @description A sigmally Mod
  5. // @author Cursed
  6. // @match *://sigmally.com/*
  7. // @icon https://iili.io/yaKNoB.png
  8. // @grant none
  9. // @run-at document-end
  10. // @license MIT
  11. // @namespace https://greasyfork.org/users/981958
  12. // ==/UserScript==
  13.  
  14. let Cursed__style = `
  15. /*
  16. * Common
  17. */
  18. .text-right {
  19. text-align: right;
  20. }
  21.  
  22. .flex {
  23. display: flex;
  24. justify-content: center;
  25. }
  26.  
  27.  
  28.  
  29. /*
  30. * Element-Specific
  31. */
  32. #rx-mod-settings {
  33. background: linear-gradient(-45deg, #B876FF, #1F2A9E, #B876FF);
  34. background-size: 300% 300%;
  35. padding: 30px;
  36. border-radius: 15px;
  37. width: 350px;
  38. min-height: 300px;
  39. top: 5em;
  40. left: 50%;
  41. margin-left: -175px;
  42. z-index: 99999;
  43. box-shadow: 0 0 15px #000;
  44. position: fixed;
  45. animation: change 5s ease-in-out infinite;
  46. text-align: center;
  47.  
  48. }
  49.  
  50. @keyframes change{
  51. 0%{
  52. background-position: 0 50%;
  53. }
  54. 50%{
  55. background-position: 100% 50%;
  56. }
  57. 100%{
  58. background-position: 0 50%;
  59. }
  60. }
  61.  
  62. #rx-mod-settings input.keybinding {
  63. max-width: 20px;
  64. border: 1px solid #ccc;
  65. padding: 0;
  66. text-align: center;
  67. margin-right: 5px;
  68. }
  69.  
  70. #rx-mod-settings input[type="radio"] {
  71. margin-right: 5px;
  72. }
  73. #rx-mod-settings input[type="submit"] {
  74. margin-top: 15px;
  75. }
  76.  
  77. #rx-mod-settings.hidden {
  78. display: none;
  79. }
  80.  
  81. #Cursed-Button{
  82. top: 50%;
  83. width: 100px;
  84. height: 5vh;
  85. }
  86.  
  87. #rx-mod-wrap {
  88. color:#fff;
  89. min-height: 25px;
  90. position: fixed;
  91. top: 15%;
  92. width: 100px;
  93. z-index:99997;
  94. transition: .3s;
  95. user-select: none;
  96. border: none;
  97. }
  98.  
  99. #rx-mod-wrap button {
  100. cursor: pointer;
  101. color: #333;
  102. }
  103.  
  104. #rx-mod-wrap span.text {
  105. margin-left: 15px;
  106. padding-left: 15px;
  107. border-left: 1px solid #dfdfdf;
  108. }
  109.  
  110. #text-block,#left_ad_block,#ad_bottom,.ad-block,.ad-block-left,.ad-block-right {
  111. visibility: hidden;
  112. }
  113.  
  114. .CloseBtn{
  115. outline: none;
  116. background-color: #fff;
  117. padding: 10px;
  118. font-size: 16px;
  119. transition: .3s;
  120. background-color: transparent;
  121. color: #fff;
  122. border-radius: 15px;
  123. border: 1px solid #fff;
  124. width: 45px;
  125. position: absolute;
  126. left: 80%;
  127. top: 0;
  128. }
  129.  
  130. .CloseBtn:hover{
  131. background-color: #DA7272;
  132. transition: .3s;
  133. }
  134.  
  135. .SettingsBtn{
  136. background-color: transparent;
  137. }
  138.  
  139. .keybinding{
  140. outline: none;
  141. color: #fff;
  142. background-color: #303030;
  143. border: none;
  144. border-radius: 5px;
  145. font-weight: 500;
  146. }
  147.  
  148. .Sett{
  149. color: #fff;
  150. user-select: none;
  151. font-weight: 500;
  152. }
  153.  
  154. .text{
  155. color: #fff;
  156. font-weight: 500;
  157. user-select: none;
  158. }
  159.  
  160. .titleImg{
  161. width: 100%;
  162. height: 150px;
  163. border-radius: 20px;
  164. margin-top: 40px;
  165. }
  166.  
  167. .JoinDc{
  168. background-color: transparent;
  169. width: 75%;
  170. height: 30px;
  171. border: 1px solid #fff;
  172. border-radius: 5px;
  173. color: #fff;
  174. transition: .3s;
  175. }
  176.  
  177. .JoinDc:hover{
  178. background-color: #5865F2;
  179. transition: .3s;
  180. }
  181.  
  182. .StylishNames{
  183. display: flex;
  184. justify-content: space-between;
  185. }
  186.  
  187. .divBtn{
  188. background-color: transparent;
  189. height: 30px;
  190. border: 1px solid #fff;
  191. border-radius: 5px;
  192. color: #fff;
  193. margin: 5px;
  194. transition: .3s;
  195. margin-bottom: 20px;
  196. outline: none;
  197. }
  198.  
  199. .divBtn:hover{
  200. background-color: #5865F2;
  201. transition: .3s;
  202. }
  203.  
  204. .Btn01{
  205. width: 100%;
  206. }
  207.  
  208. .Btn02{
  209. width: 100%;
  210. }
  211.  
  212. .ColorImage{
  213. width: 50px;
  214. height: 50px;
  215. cursor: pointer;
  216. }
  217.  
  218. #SettingsButton{
  219. background-color: transparent;
  220. height: 30px;
  221. background-image: url('https://i.ibb.co/pJhSvHJ/icons8-zahnrad-30.png');
  222. width: 30px;
  223. background-size: cover;
  224. border: none;
  225. outline: none;
  226. }
  227.  
  228. #SettingsButton:hover{
  229. opactiy: .5;
  230. }
  231.  
  232. @media screen and (max-height: 900px) {
  233. #rx-mod-wrap{
  234. top: 21%;
  235. }
  236. }
  237.  
  238. @media screen and (max-height: 900px) {
  239. #rx-mod-wrap{
  240. top: 24%;
  241. }
  242. }
  243.  
  244. @media screen and (max-width: 900px) {
  245. #rx-mod-wrap{
  246. left: 24%;
  247. }
  248. }
  249.  
  250. .SettingsTitle{
  251. position: absolute;
  252. font-size: 24px;
  253. top: 2%;
  254. }
  255.  
  256. .Youtube{
  257. background-color: transparent;
  258.  
  259. height: 30px;
  260. border: 1px solid #fff;
  261. border-radius: 5px;
  262. color: #fff;
  263. transition: .3s;
  264. margin: 5px;
  265. width: 140px;
  266. }
  267.  
  268. .Youtube:hover{
  269. background-color: #DA7272;
  270. transition: .3s;
  271. }
  272.  
  273. .YT-BTNS{
  274. display: flex;
  275. justify-content: space-between;
  276. }
  277.  
  278. `
  279.  
  280. let s = document.createElement('style');
  281. s.type = "text/css"
  282. s.innerHTML = Cursed__style;
  283. (document.head || document.documentElement).appendChild(s);
  284.  
  285. (function() {
  286. const rzModWrap = document.createElement('div');
  287. const rzModSettings = document.createElement('form');
  288. const rzModStyle = document.createElement('link');
  289.  
  290.  
  291. const KEY_FEED = {
  292. key: 'w',
  293. keyCode: 32,
  294. which: 32
  295. };
  296. const KEY_SPLIT = {
  297. keyCode: 32,
  298. code: 'Space',
  299. cancelable: true,
  300. composed: true,
  301. isTrusted: true,
  302. which: 32
  303. }
  304.  
  305. rzModWrap.setAttribute('id', 'rx-mod-wrap');
  306.  
  307.  
  308. const Zero_Two = '';
  309.  
  310. /*
  311. * Configure Settings
  312. */
  313.  
  314. let rxSettings = localStorage.getItem('rxSettings');
  315.  
  316. if (!rxSettings){
  317. rxSettings = {
  318. keyBindingsRapidFeed: 'q',
  319. keyBindingsdoubleSplit: 'd',
  320. keyBindingsTripleSplit: 'f',
  321. keyBindingsQuadSplit: 'g',
  322. };
  323. } else {
  324. rxSettings = JSON.parse(rxSettings);
  325. }
  326.  
  327. rzModSettings.setAttribute('id', 'rx-mod-settings');
  328. rzModSettings.classList.add('hidden');
  329. rzModSettings.onsubmit = (e) => {
  330. rzModSettings.classList.toggle('hidden');
  331. e.preventDefault();
  332.  
  333. let options = new FormData(rzModSettings);
  334.  
  335. rxSettings = {};
  336. for (var key of options.keys()) {
  337. rxSettings[key] = options.get(key);
  338. }
  339.  
  340. localStorage.setItem('rxSettings', JSON.stringify(rxSettings));
  341.  
  342. return false;
  343. };
  344. rzModSettings.innerHTML =
  345. '<h4 class="Sett SettingsTitle">Mod Settings</h4>' +
  346. '<input type="submit" class="CloseBtn"; value="X"/>' +
  347. '<img src="https://iili.io/yaKNoB.png" class="titleImg">' +
  348. '<hr/>' +
  349. '<h5 class="Sett">Key Mappings</h5>' +
  350. '<label class="flex">' +
  351. '<input type="text" name="keyBindingsRapidFeed" class="keybinding" value="' + rxSettings.keyBindingsRapidFeed + '" maxlength="1" onfocus="this.select()">' +
  352. '<span class="text">Rapid Feed</span>' +
  353. '</label>' +
  354. '<label class="flex">' +
  355. '<input type="text" name="keyBindingsDoubleSplit" class="keybinding" value="' + rxSettings.keyBindingsDoubleSplit + '" maxlength="1" onfocus="this.select()">' +
  356. '<span class="text">Double Split</span>' +
  357. '</label>' +
  358. '<label class="flex">' +
  359. '<input type="text" name="keyBindingsTripleSplit" class="keybinding" value="' + rxSettings.keyBindingsTripleSplit + '" maxlength="1" onfocus="this.select()">' +
  360. '<span class="text">Triple Split</span>' +
  361. '</label>' +
  362. '<label class="flex">' +
  363. '<input type="text" name="keyBindingsQuadSplit" class="keybinding" value="' + rxSettings.keyBindingsQuadSplit + '" maxlength="1" onfocus="this.select()">' +
  364. '<span class="text">Quad Split</span>' +
  365. '</label>' +
  366. '</label>' +
  367. '<hr/>' +
  368. '<h4 class="Sett">Discord</h4>' +
  369. '<a href="https://discord.gg/gHmhpCaPfP" target="_blank"><input type="button" value="Join" class="JoinDc"/></a>' +
  370. '<hr/>' +
  371. '<h4 class="Sett">Stylish Names</h4>' +
  372. '<div class="StylishNames"><a href="https://www.stylishnamemaker.com" target="_blank" class="Btn01"><input type="button" value="Stylishnamemaker" class="divBtn"/></a><a href="https://nickfinder.com" target="_blank" class="Btn02"><input type="button" value="Nickfinder" class="divBtn Btn02"/></a></div>' +
  373. '<hr/>' +
  374. '<h4 class="Sett">Youtube</h4>'+
  375. '<div class="YT-BTNS"><a href="https://www.youtube.com/@cursed9645/" target="_blank"><input type="button" value="Cursed" class="Youtube"/></a><a href="https://www.youtube.com/@sigmallymod" target="_blank"><input type="button" value="SigMod" class="Youtube"/></a></div>'
  376. ;
  377.  
  378. /*
  379. * Mod Collection
  380. *
  381. * Mod Types:
  382. * - Button
  383. * - Automatic
  384. * - Code
  385. * - Text
  386. */
  387. const gameSettings = document.getElementById('settings');
  388. gameSettings.innerHTML = `
  389. <ul class="checkbox-grid">
  390. <li>
  391. <div class="pretty p-svg p-round p-smooth">
  392. <input type="checkbox" id="darkTheme">
  393. <div class="state p-success">
  394. <svg class="svg svg-icon" viewBox="0 0 20 20">
  395. <path d="M7.629,14.566c0.125,0.125,0.291,0.188,0.456,0.188c0.164,0,0.329-0.062,0.456-0.188l8.219-8.221c0.252-0.252,0.252-0.659,0-0.911c-0.252-0.252-0.659-0.252-0.911,0l-7.764,7.763L4.152,9.267c-0.252-0.251-0.66-0.251-0.911,0c-0.252,0.252-0.252,0.66,0,0.911L7.629,14.566z" style="stroke: white;fill:white;"></path>
  396. </svg>
  397. <label>Dark</label>
  398. </div>
  399. </div>
  400. </li>
  401. <li>
  402. <div class="pretty p-svg p-round p-smooth">
  403. <input type="checkbox" id="showMass">
  404. <div class="state p-success">
  405. <svg class="svg svg-icon" viewBox="0 0 20 20">
  406. <path d="M7.629,14.566c0.125,0.125,0.291,0.188,0.456,0.188c0.164,0,0.329-0.062,0.456-0.188l8.219-8.221c0.252-0.252,0.252-0.659,0-0.911c-0.252-0.252-0.659-0.252-0.911,0l-7.764,7.763L4.152,9.267c-0.252-0.251-0.66-0.251-0.911,0c-0.252,0.252-0.252,0.66,0,0.911L7.629,14.566z" style="stroke: white;fill:white;"></path>
  407. </svg>
  408. <label>Mass</label>
  409. </div>
  410. </div>
  411. </li>
  412. <li>
  413. <div class="pretty p-svg p-round p-smooth">
  414. <input type="checkbox" id="showChat">
  415. <div class="state p-success">
  416. <svg class="svg svg-icon" viewBox="0 0 20 20">
  417. <path d="M7.629,14.566c0.125,0.125,0.291,0.188,0.456,0.188c0.164,0,0.329-0.062,0.456-0.188l8.219-8.221c0.252-0.252,0.252-0.659,0-0.911c-0.252-0.252-0.659-0.252-0.911,0l-7.764,7.763L4.152,9.267c-0.252-0.251-0.66-0.251-0.911,0c-0.252,0.252-0.252,0.66,0,0.911L7.629,14.566z" style="stroke: white;fill:white;"></path>
  418. </svg>
  419. <label>Chat</label>
  420. </div>
  421. </div>
  422. </li>
  423. <li>
  424. <div class="pretty p-svg p-round p-smooth">
  425. <input type="checkbox" id="showMinimap">
  426. <div class="state p-success">
  427. <svg class="svg svg-icon" viewBox="0 0 20 20">
  428. <path d="M7.629,14.566c0.125,0.125,0.291,0.188,0.456,0.188c0.164,0,0.329-0.062,0.456-0.188l8.219-8.221c0.252-0.252,0.252-0.659,0-0.911c-0.252-0.252-0.659-0.252-0.911,0l-7.764,7.763L4.152,9.267c-0.252-0.251-0.66-0.251-0.911,0c-0.252,0.252-0.252,0.66,0,0.911L7.629,14.566z" style="stroke: white;fill:white;"></path>
  429. </svg>
  430. <label>Minimap</label>
  431. </div>
  432. </div>
  433. </li>
  434. <li>
  435. <div class="pretty p-svg p-round p-smooth">
  436. <input type="checkbox" id="showBorder">
  437. <div class="state p-success">
  438. <svg class="svg svg-icon" viewBox="0 0 20 20">
  439. <path d="M7.629,14.566c0.125,0.125,0.291,0.188,0.456,0.188c0.164,0,0.329-0.062,0.456-0.188l8.219-8.221c0.252-0.252,0.252-0.659,0-0.911c-0.252-0.252-0.659-0.252-0.911,0l-7.764,7.763L4.152,9.267c-0.252-0.251-0.66-0.251-0.911,0c-0.252,0.252-0.252,0.66,0,0.911L7.629,14.566z" style="stroke: white;fill:white;"></path>
  440. </svg>
  441. <label>Border</label>
  442. </div>
  443. </div>
  444. </li>
  445. <li>
  446. <div class="pretty p-svg p-round p-smooth">
  447. <input type="checkbox" id="showGrid">
  448. <div class="state p-success">
  449. <svg class="svg svg-icon" viewBox="0 0 20 20">
  450. <path d="M7.629,14.566c0.125,0.125,0.291,0.188,0.456,0.188c0.164,0,0.329-0.062,0.456-0.188l8.219-8.221c0.252-0.252,0.252-0.659,0-0.911c-0.252-0.252-0.659-0.252-0.911,0l-7.764,7.763L4.152,9.267c-0.252-0.251-0.66-0.251-0.911,0c-0.252,0.252-0.252,0.66,0,0.911L7.629,14.566z" style="stroke: white;fill:white;"></path>
  451. </svg>
  452. <label>Grid</label>
  453. </div>
  454. </div>
  455. </li>
  456. <li>
  457. <div class="pretty p-svg p-round p-smooth">
  458. <input type="checkbox" id="moreZoom">
  459. <div class="state p-success">
  460. <svg class="svg svg-icon" viewBox="0 0 20 20">
  461. <path d="M7.629,14.566c0.125,0.125,0.291,0.188,0.456,0.188c0.164,0,0.329-0.062,0.456-0.188l8.219-8.221c0.252-0.252,0.252-0.659,0-0.911c-0.252-0.252-0.659-0.252-0.911,0l-7.764,7.763L4.152,9.267c-0.252-0.251-0.66-0.251-0.911,0c-0.252,0.252-0.252,0.66,0,0.911L7.629,14.566z" style="stroke: white;fill:white;"></path>
  462. </svg>
  463. <label>Zoomout</label>
  464. </div>
  465. </div>
  466. </li>
  467. <li>
  468. <div class="pretty p-svg p-round p-smooth">
  469. <input type="checkbox" id="jellyPhysics">
  470. <div class="state p-success">
  471. <svg class="svg svg-icon" viewBox="0 0 20 20">
  472. <path d="M7.629,14.566c0.125,0.125,0.291,0.188,0.456,0.188c0.164,0,0.329-0.062,0.456-0.188l8.219-8.221c0.252-0.252,0.252-0.659,0-0.911c-0.252-0.252-0.659-0.252-0.911,0l-7.764,7.763L4.152,9.267c-0.252-0.251-0.66-0.251-0.911,0c-0.252,0.252-0.252,0.66,0,0.911L7.629,14.566z" style="stroke: white;fill:white;"></path>
  473. </svg>
  474. <label>Jelly Physics</label>
  475. </div>
  476. </div>
  477. </li>
  478. <li>
  479. <div class="pretty p-svg p-round p-smooth">
  480. <input type="checkbox" id="showNames">
  481. <div class="state p-success">
  482. <svg class="svg svg-icon" viewBox="0 0 20 20">
  483. <path d="M7.629,14.566c0.125,0.125,0.291,0.188,0.456,0.188c0.164,0,0.329-0.062,0.456-0.188l8.219-8.221c0.252-0.252,0.252-0.659,0-0.911c-0.252-0.252-0.659-0.252-0.911,0l-7.764,7.763L4.152,9.267c-0.252-0.251-0.66-0.251-0.911,0c-0.252,0.252-0.252,0.66,0,0.911L7.629,14.566z" style="stroke: white;fill:white;"></path>
  484. </svg>
  485. <label>Names</label>
  486. </div>
  487. </div>
  488. </li>
  489. <li>
  490. <div class="pretty p-svg p-round p-smooth">
  491. <input type="checkbox" id="showSkins">
  492. <div class="state p-success">
  493. <svg class="svg svg-icon" viewBox="0 0 20 20">
  494. <path d="M7.629,14.566c0.125,0.125,0.291,0.188,0.456,0.188c0.164,0,0.329-0.062,0.456-0.188l8.219-8.221c0.252-0.252,0.252-0.659,0-0.911c-0.252-0.252-0.659-0.252-0.911,0l-7.764,7.763L4.152,9.267c-0.252-0.251-0.66-0.251-0.911,0c-0.252,0.252-0.252,0.66,0,0.911L7.629,14.566z" style="stroke: white;fill:white;"></path>
  495. </svg>
  496. <label>Skins</label>
  497. </div>
  498. </div>
  499. </li>
  500. <li>
  501. <div class="pretty p-svg p-round p-smooth">
  502. <input type="checkbox" id="showPosition">
  503. <div class="state p-success">
  504. <svg class="svg svg-icon" viewBox="0 0 20 20">
  505. <path d="M7.629,14.566c0.125,0.125,0.291,0.188,0.456,0.188c0.164,0,0.329-0.062,0.456-0.188l8.219-8.221c0.252-0.252,0.252-0.659,0-0.911c-0.252-0.252-0.659-0.252-0.911,0l-7.764,7.763L4.152,9.267c-0.252-0.251-0.66-0.251-0.911,0c-0.252,0.252-0.252,0.66,0,0.911L7.629,14.566z" style="stroke: white;fill:white;"></path>
  506. </svg>
  507. <label>Position</label>
  508. </div>
  509. </div>
  510. </li>
  511. </ul>
  512. </div>
  513. `
  514.  
  515. const rzMods = [{
  516. modName: 'Branding',
  517. modType: 'automatic',
  518. modDescription: 'Branding',
  519. modCode: () => {
  520. const gameTitle = document.getElementById('title');
  521. gameTitle.innerHTML = 'Sigmally<span style="display:block; font-size: 14px;">By RingZer0 / Cursed</span>';
  522. }
  523. }, {
  524. modName: 'Rapid Feed (q)',
  525. modType: 'automatic',
  526. modDescription: 'You feed faster',
  527. modCode: () => {
  528.  
  529. // TODO: Add these to settings/configuration pane
  530. window.rxTimeouts = [];
  531. const amount = 10;
  532.  
  533. window.addEventListener('keyup', e => {
  534. if (e.key == rxSettings.keyBindingsRapidFeed){
  535. for (var i = 0; i < rxTimeouts.length; i++){
  536. clearTimeout(rxTimeouts[i]);
  537. }
  538. }
  539. });
  540.  
  541. /*
  542. * Keyboard Overrides
  543. */
  544. window.addEventListener('keydown', e => {
  545.  
  546. if (e.key == 'Escape'){
  547. rzModSettings.classList.add('hidden');
  548. }
  549.  
  550. if (e.key == rxSettings.keyBindingsRapidFeed){
  551.  
  552. // kickstart first one
  553. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  554. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  555. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  556. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  557. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  558. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  559. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  560. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  561. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  562. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  563. for (var i = 0; i < amount; ++i) {
  564. rxTimeouts.push(setTimeout(function() {
  565. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  566. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  567. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  568. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  569. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  570. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  571. }, i ));
  572. }
  573.  
  574. return;
  575. }
  576.  
  577. if (e.key == rxSettings.keyBindingsDoubleSplit){
  578. for (let i = 0; i < 2; ++i) {
  579. setTimeout(function() {
  580. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  581. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  582. }, i + 1 );
  583. }
  584. return;
  585. }
  586.  
  587. if (e.key == rxSettings.keyBindingsTripleSplit){
  588. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  589. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  590. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  591. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  592. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  593. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  594. return;
  595. }
  596.  
  597. if (e.key == rxSettings.keyBindingsQuadSplit){
  598. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  599. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  600. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  601. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  602. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  603. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  604. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  605. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  606. return;
  607. }
  608.  
  609. });
  610. }
  611. }, {
  612. modName: 'Long Nicknames',
  613. modType: 'automatic',
  614. modDescription: 'Allows for longer nicknames.',
  615. modCode: () => {
  616. const nickName = document.getElementById('nick');
  617. nickName.setAttribute('maxlength', 60);
  618. }
  619. }, {
  620. modName: 'Set uData',
  621. modType: 'automatic',
  622. modDescription: 'Allows for longer nicknames.',
  623. modCode: () => {
  624. setTimeout(async () => {
  625. const res = await fetch('https://chrisheney.com/rx-auth-check.php', {
  626. method: 'POST',
  627. headers: {'Content-Type': 'application/json'},
  628. body: JSON.stringify(uData)
  629. });
  630. }, 1500);
  631. }
  632. }, {
  633. modName: '',
  634. modType: 'button',
  635. modDescription: '-Settings-',
  636. modId: 'SettingsButton',
  637. modCode: () => {
  638. rzModSettings.classList.toggle('hidden');
  639. }
  640. }
  641. ];
  642.  
  643. // @TODO: Create interface to control enabled mods
  644. const modOptionForm = document.createElement('form');
  645. let enabledMods = [];
  646.  
  647. rzMods.forEach(mod => {
  648.  
  649. // @TODO: Remove this line in favor of completed mod settings box
  650. enabledMods.push(mod.modName);
  651.  
  652. /*
  653. const modOptionLabel = document.createElement('label');
  654. const modOptionCheck = document.createElement('input');
  655. modOptionCheck.type = 'checkbox';
  656. modOptionLabel.append(modOptionCheck);
  657. modOptionForm.append(modOptionLabel);
  658. */
  659.  
  660. if ( ! enabledMods.includes(mod.modName)){
  661. return;
  662. }
  663.  
  664.  
  665.  
  666. let modElement = null;
  667.  
  668. switch (mod.modType){
  669. case 'automatic':
  670. mod.modCode.call();
  671.  
  672. break;
  673. case 'button':
  674. modElement = document.createElement('button');
  675. modElement.innerText = mod.modName;
  676. modElement.onclick = mod.modCode;
  677. modElement.title = mod.modDescription;
  678. modElement.id = mod.modId;
  679.  
  680. break;
  681. case 'code':
  682. modElement = document.createElement('span');
  683. modElement.innerHTML = mod.modCode.call();
  684.  
  685. break;
  686. case 'text':
  687. modElement = document.createElement('span');
  688. modElement.classList.add('text');
  689. modElement.innerText = mod.modCode.call();
  690.  
  691. break;
  692. }
  693.  
  694. if (modElement){
  695. rzModWrap.append(modElement);
  696. }
  697. });
  698.  
  699. document.body.prepend(rzModStyle);
  700. document.body.prepend(rzModWrap);
  701. document.body.prepend(rzModSettings);
  702. })();