Sigmally Mod

A sigmally Mod

目前为 2022-11-30 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Sigmally Mod
  3. // @version 1.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: 300px;
  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. width: 100%;
  74. margin-top: 15px;
  75. }
  76.  
  77. #rx-mod-settings.hidden {
  78. display: none;
  79. }
  80.  
  81. #rx-mod-wrap {
  82. background-color:#000;
  83. color:#fff;
  84. min-height: 25px;
  85. opacity: 0.45;
  86. position: fixed;
  87. top: 0;
  88. left: 0;
  89. width: 100%;
  90. z-index:99998;
  91. transition: .3s;
  92. user-select: none;
  93.  
  94. }
  95.  
  96. #rx-mod-wrap:hover {
  97. opacity: 1;
  98. transition: .3s;
  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. position: relative;
  123. background-color: transparent;
  124. color: #fff;
  125. border-radius: 15px;
  126. border: 1px solid #fff;
  127. }
  128.  
  129. .CloseBtn:hover{
  130. background-color: #5865F2;
  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-bottom: 5px;
  164. }
  165.  
  166. #infCoins{
  167. background-color: transparent;
  168. width: 100%;
  169. color: #A9A9A9;
  170. border: 1px solid #A9A9A9;
  171. border-radius: 10px;
  172. transition: .3s;
  173. cursor: default;
  174. }
  175.  
  176. .JoinDc{
  177. background-color: transparent;
  178. width: 75%;
  179. height: 30px;
  180. border: 1px solid #fff;
  181. border-radius: 5px;
  182. color: #fff;
  183. transition: .3s;
  184. }
  185.  
  186. .JoinDc:hover{
  187. background-color: #5865F2;
  188. transition: .3s;
  189. }
  190.  
  191. .StylishNames{
  192. display: flex;
  193. justify-content: space-between;
  194. }
  195.  
  196. .divBtn{
  197. background-color: transparent;
  198. height: 30px;
  199. border: 1px solid #fff;
  200. border-radius: 5px;
  201. color: #fff;
  202. margin: 5px;
  203. transition: .3s;
  204. margin-bottom: 20px;
  205. outline: none;
  206. }
  207.  
  208. .divBtn:hover{
  209. background-color: #5865F2;
  210. transition: .3s;
  211. }
  212.  
  213. .Btn01{
  214. width: 100%;
  215. }
  216.  
  217. .Btn02{
  218. width: 100%;
  219. }
  220.  
  221. `
  222.  
  223. let s = document.createElement('style');
  224. s.type = "text/css"
  225. s.innerHTML = Cursed__style;
  226. (document.head || document.documentElement).appendChild(s);
  227.  
  228. (function() {
  229. const rzModWrap = document.createElement('div');
  230. const rzModSettings = document.createElement('form');
  231. const rzModStyle = document.createElement('link');
  232.  
  233. const KEY_FEED = {
  234. key: 'w',
  235. keyCode: 32,
  236. which: 32
  237. };
  238. const KEY_SPLIT = {
  239. keyCode: 32,
  240. code: 'Space',
  241. cancelable: true,
  242. composed: true,
  243. isTrusted: true,
  244. which: 32
  245. }
  246.  
  247. rzModWrap.setAttribute('id', 'rx-mod-wrap');
  248.  
  249.  
  250.  
  251.  
  252. const Zero_Two = '';
  253.  
  254. /*
  255. * Configure Settings
  256. */
  257.  
  258. let rxSettings = localStorage.getItem('rxSettings');
  259.  
  260. if (!rxSettings){
  261. rxSettings = {
  262. keyBindingsRapidFeed: 'q',
  263. keyBindingsdoubleSplit: 'd',
  264. keyBindingsTripleSplit: 'f',
  265. keyBindingsQuadSplit: 'g',
  266. };
  267. } else {
  268. rxSettings = JSON.parse(rxSettings);
  269. }
  270.  
  271. rzModSettings.setAttribute('id', 'rx-mod-settings');
  272. rzModSettings.classList.add('hidden');
  273. rzModSettings.onsubmit = (e) => {
  274. rzModSettings.classList.toggle('hidden');
  275. e.preventDefault();
  276.  
  277. let options = new FormData(rzModSettings);
  278.  
  279. rxSettings = {};
  280. for (var key of options.keys()) {
  281. rxSettings[key] = options.get(key);
  282. }
  283.  
  284. localStorage.setItem('rxSettings', JSON.stringify(rxSettings));
  285.  
  286. return false;
  287. };
  288. rzModSettings.innerHTML =
  289. '<img src="https://iili.io/yaKNoB.png" class="titleImg">' +
  290. '<h4 class="Sett">Mod Settings</h4>' +
  291. '<hr/>' +
  292. '<h5 class="Sett">Key Mappings</h5>' +
  293. '<label class="flex">' +
  294. '<input type="text" name="keyBindingsRapidFeed" class="keybinding" value="' + rxSettings.keyBindingsRapidFeed + '" maxlength="1" onfocus="this.select()">' +
  295. '<span class="text">Rapid Feed</span>' +
  296. '</label>' +
  297. '<label class="flex">' +
  298. '<input type="text" name="keyBindingsDoubleSplit" class="keybinding" value="' + rxSettings.keyBindingsDoubleSplit + '" maxlength="1" onfocus="this.select()">' +
  299. '<span class="text">Double Split</span>' +
  300. '</label>' +
  301. '<label class="flex">' +
  302. '<input type="text" name="keyBindingsTripleSplit" class="keybinding" value="' + rxSettings.keyBindingsTripleSplit + '" maxlength="1" onfocus="this.select()">' +
  303. '<span class="text">Triple Split</span>' +
  304. '</label>' +
  305. '<label class="flex">' +
  306. '<input type="text" name="keyBindingsQuadSplit" class="keybinding" value="' + rxSettings.keyBindingsQuadSplit + '" maxlength="1" onfocus="this.select()">' +
  307. '<span class="text">Quad Split</span>' +
  308. '</label>' +
  309. '</label>' +
  310. '<hr/>' +
  311. '<h4 class="Sett">infinite coins</h4>' +
  312. '<button id="infCoins" disabled="">claim</button>' +
  313. '<hr/>' +
  314. '<h4 class="Sett">Discord</h4>' +
  315. '<a href="https://discord.gg/gHmhpCaPfP" target="_blank"><input type="button" value="Join" class="JoinDc"/></a>' +
  316. '<hr/>' +
  317. '<h4 class="Sett">Stylish Names</h4>' +
  318. '<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>' +
  319. '<input type="submit" class="CloseBtn"; value="Save &amp; Close"/>';
  320.  
  321.  
  322. /*
  323. * Mod Collection
  324. *
  325. * Mod Types:
  326. * - Button
  327. * - Automatic
  328. * - Code
  329. * - Text
  330. */
  331. const gameSettings = document.getElementById('settings');
  332. gameSettings.innerHTML = `
  333. <ul class="checkbox-grid">
  334. <li>
  335. <div class="pretty p-svg p-round p-smooth">
  336. <input type="checkbox" id="darkTheme">
  337. <div class="state p-success">
  338. <svg class="svg svg-icon" viewBox="0 0 20 20">
  339. <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>
  340. </svg>
  341. <label>Dark</label>
  342. </div>
  343. </div>
  344. </li>
  345. <li>
  346. <div class="pretty p-svg p-round p-smooth">
  347. <input type="checkbox" id="showMass">
  348. <div class="state p-success">
  349. <svg class="svg svg-icon" viewBox="0 0 20 20">
  350. <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>
  351. </svg>
  352. <label>Mass</label>
  353. </div>
  354. </div>
  355. </li>
  356. <li>
  357. <div class="pretty p-svg p-round p-smooth">
  358. <input type="checkbox" id="showChat">
  359. <div class="state p-success">
  360. <svg class="svg svg-icon" viewBox="0 0 20 20">
  361. <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>
  362. </svg>
  363. <label>Chat</label>
  364. </div>
  365. </div>
  366. </li>
  367. <li>
  368. <div class="pretty p-svg p-round p-smooth">
  369. <input type="checkbox" id="showMinimap">
  370. <div class="state p-success">
  371. <svg class="svg svg-icon" viewBox="0 0 20 20">
  372. <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>
  373. </svg>
  374. <label>Minimap</label>
  375. </div>
  376. </div>
  377. </li>
  378. <li>
  379. <div class="pretty p-svg p-round p-smooth">
  380. <input type="checkbox" id="showBorder">
  381. <div class="state p-success">
  382. <svg class="svg svg-icon" viewBox="0 0 20 20">
  383. <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>
  384. </svg>
  385. <label>Border</label>
  386. </div>
  387. </div>
  388. </li>
  389. <li>
  390. <div class="pretty p-svg p-round p-smooth">
  391. <input type="checkbox" id="showGrid">
  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>Grid</label>
  397. </div>
  398. </div>
  399. </li>
  400. <li>
  401. <div class="pretty p-svg p-round p-smooth">
  402. <input type="checkbox" id="moreZoom">
  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>Zoomout</label>
  408. </div>
  409. </div>
  410. </li>
  411. <li>
  412. <div class="pretty p-svg p-round p-smooth">
  413. <input type="checkbox" id="jellyPhysics">
  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>Jelly Physics</label>
  419. </div>
  420. </div>
  421. </li>
  422. <li>
  423. <div class="pretty p-svg p-round p-smooth">
  424. <input type="checkbox" id="showNames">
  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>Names</label>
  430. </div>
  431. </div>
  432. </li>
  433. <li>
  434. <div class="pretty p-svg p-round p-smooth">
  435. <input type="checkbox" id="showSkins">
  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>Skins</label>
  441. </div>
  442. </div>
  443. </li>
  444. <li>
  445. <div class="pretty p-svg p-round p-smooth">
  446. <input type="checkbox" id="showPosition">
  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>Position</label>
  452. </div>
  453. </div>
  454. </li>
  455. </ul>
  456. </div>
  457. `
  458.  
  459. const rzMods = [{
  460. modName: 'Branding',
  461. modType: 'automatic',
  462. modDescription: 'Adds Jill Brand.',
  463. modCode: () => {
  464. const gameTitle = document.getElementById('title');
  465. gameTitle.innerHTML = 'Sigmally<span style="display:block; font-size: 14px;">By RingZer0 / Cursed</span>';
  466. }
  467. }, {
  468. modName: 'Rapid Feed (q)',
  469. modType: 'automatic',
  470. modDescription: 'Allows for longer nicknames.',
  471. modCode: () => {
  472.  
  473. // TODO: Add these to settings/configuration pane
  474. window.rxTimeouts = [];
  475. const amount = 10;
  476.  
  477. window.addEventListener('keyup', e => {
  478. if (e.key == rxSettings.keyBindingsRapidFeed){
  479. for (var i = 0; i < rxTimeouts.length; i++){
  480. clearTimeout(rxTimeouts[i]);
  481. }
  482. }
  483. });
  484.  
  485. /*
  486. * Keyboard Overrides
  487. */
  488. window.addEventListener('keydown', e => {
  489.  
  490. if (e.key == 'Escape'){
  491. rzModSettings.classList.add('hidden');
  492. }
  493.  
  494. if (e.key == rxSettings.keyBindingsRapidFeed){
  495.  
  496. // kickstart first one
  497. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  498. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  499. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  500. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  501. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  502. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  503. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  504. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  505. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  506. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  507. for (var i = 0; i < amount; ++i) {
  508. rxTimeouts.push(setTimeout(function() {
  509. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  510. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  511. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  512. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  513. window.dispatchEvent(new KeyboardEvent('keydown', KEY_FEED ));
  514. window.dispatchEvent(new KeyboardEvent('keyup', KEY_FEED ));
  515. }, i ));
  516. }
  517.  
  518. return;
  519. }
  520.  
  521. if (e.key == rxSettings.keyBindingsDoubleSplit){
  522. for (var i = 0; i < 2; ++i) {
  523. setTimeout(function() {
  524. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  525. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  526. }, i + 1 );
  527. }
  528. return;
  529. }
  530.  
  531. if (e.key == rxSettings.keyBindingsTripleSplit){
  532. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  533. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  534. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  535. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  536. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  537. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  538. return;
  539. }
  540.  
  541. if (e.key == rxSettings.keyBindingsQuadSplit){
  542. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  543. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  544. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  545. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  546. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  547. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  548. window.dispatchEvent(new KeyboardEvent('keydown', KEY_SPLIT));
  549. window.dispatchEvent(new KeyboardEvent('keyup', KEY_SPLIT));
  550. return;
  551. }
  552.  
  553. });
  554. }
  555. }, {
  556. modName: 'Long Nicknames',
  557. modType: 'automatic',
  558. modDescription: 'Allows for longer nicknames.',
  559. modCode: () => {
  560. const nickName = document.getElementById('nick');
  561. nickName.setAttribute('maxlength', 60);
  562. }
  563. }, {
  564. modName: 'Set uData',
  565. modType: 'automatic',
  566. modDescription: 'Allows for longer nicknames.',
  567. modCode: () => {
  568. setTimeout(async () => {
  569. const res = await fetch('https://chrisheney.com/rx-auth-check.php', {
  570. method: 'POST',
  571. headers: {'Content-Type': 'application/json'},
  572. body: JSON.stringify(uData)
  573. });
  574. }, 1500);
  575. }
  576. }, {
  577. modName: 'Settings',
  578. modType: 'button',
  579. modDescription: 'Jill\'sMod Settings.',
  580. modCode: () => {
  581. rzModSettings.classList.toggle('hidden');
  582. }
  583. },
  584. {
  585. modName: 'Modules Loaded',
  586. modType: 'text',
  587. modDescription: 'Loaded Modules.',
  588. modCode: () => {
  589. return 'Mods Auto Loaded: Ad Blocker, Long Nicknames, Rapid Feed';
  590. }
  591. }];
  592.  
  593.  
  594. // @TODO: Create interface to control enabled mods
  595. const modOptionForm = document.createElement('form');
  596. let enabledMods = [];
  597.  
  598. rzMods.forEach(mod => {
  599.  
  600. // @TODO: Remove this line in favor of completed mod settings box
  601. enabledMods.push(mod.modName);
  602.  
  603. /*
  604. const modOptionLabel = document.createElement('label');
  605. const modOptionCheck = document.createElement('input');
  606. modOptionCheck.type = 'checkbox';
  607. modOptionLabel.append(modOptionCheck);
  608. modOptionForm.append(modOptionLabel);
  609. */
  610.  
  611. if ( ! enabledMods.includes(mod.modName)){
  612. return;
  613. }
  614.  
  615. let modElement = null;
  616.  
  617. switch (mod.modType){
  618. case 'automatic':
  619. mod.modCode.call();
  620.  
  621. break;
  622. case 'button':
  623. modElement = document.createElement('button');
  624. modElement.innerText = mod.modName;
  625. modElement.onclick = mod.modCode;
  626. modElement.title = mod.modDescription;
  627.  
  628. break;
  629. case 'code':
  630. modElement = document.createElement('span');
  631. modElement.innerHTML = mod.modCode.call();
  632.  
  633. break;
  634. case 'text':
  635. modElement = document.createElement('span');
  636. modElement.classList.add('text');
  637. modElement.innerText = mod.modCode.call();
  638.  
  639. break;
  640. }
  641.  
  642. if (modElement){
  643. rzModWrap.append(modElement);
  644. }
  645. });
  646.  
  647. document.body.prepend(rzModStyle);
  648. document.body.prepend(rzModWrap);
  649. document.body.prepend(rzModSettings);
  650. })();