Sigmally Mod

A sigmally Mod

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

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