Sigmally Mod

A sigmally Mod

当前为 2022-12-24 提交的版本,查看 最新版本

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