Greasy Fork 还支持 简体中文。

Sigmally Mod

Mod for Sigmally.com | by cursd#0126. Dark Mode, Long Nickname, Macros, Extanded Settings, no ads; Mod Menu

目前為 2023-04-18 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name Sigmally Mod
  3. // @version 2.0.3
  4. // @description Mod for Sigmally.com | by cursd#0126. Dark Mode, Long Nickname, Macros, Extanded Settings, no ads; Mod Menu
  5. // @author Cursed
  6. // @match *://sigmally.com/*
  7. // @icon https://raw.githubusercontent.com/Sigmally/SigMod/main/images/SigmodV2-Circle.png
  8. // @run-at document-end
  9. // @license MIT
  10. // @namespace https://greasyfork.org/users/981958
  11. // ==/UserScript==
  12.  
  13. (function () {
  14. const rzModWrap = document.createElement("div");
  15. const rzModSettings = document.createElement("form");
  16.  
  17. const KEY_FEED = {
  18. key: "w",
  19. keyCode: 32,
  20. which: 32,
  21. };
  22. const KEY_SPLIT = {
  23. keyCode: 32,
  24. code: "Space",
  25. cancelable: true,
  26. composed: true,
  27. isTrusted: true,
  28. which: 32,
  29. };
  30.  
  31. rzModWrap.setAttribute("id", "rx-mod-wrap");
  32.  
  33. let rxSettings = localStorage.getItem("rxSettings");
  34.  
  35. if (!rxSettings) {
  36. rxSettings = {
  37. keyBindingsRapidFeed: "q",
  38. keyBindingsdoubleSplit: "d",
  39. keyBindingsTripleSplit: "f",
  40. keyBindingsQuadSplit: "g",
  41. darkMode: true,
  42. };
  43. } else {
  44. rxSettings = JSON.parse(rxSettings);
  45. }
  46.  
  47. rzModSettings.setAttribute("id", "rx-mod-settings");
  48. rzModSettings.classList.add("hidden");
  49. rzModSettings.onsubmit = (e) => {
  50. rzModSettings.classList.toggle("hidden");
  51. e.preventDefault();
  52.  
  53. let options = new FormData(rzModSettings);
  54.  
  55. rxSettings = {};
  56. for (var key of options.keys()) {
  57. rxSettings[key] = options.get(key);
  58. }
  59.  
  60. localStorage.setItem("rxSettings", JSON.stringify(rxSettings));
  61.  
  62. return false;
  63. };
  64. rzModSettings.innerHTML =
  65. '<div class="cztop">' +
  66. '<div class="cztopleft">' +
  67. '<img src="https://i.ibb.co/stQVx38/SigmodV2.png" draggable="false" class="titleImg">' +
  68. '<h4 class="SettingsTitle">Settings</h4>' +
  69. "</div>" +
  70. '<input type="submit" class="CloseBtn"; value="X"/>' +
  71. "</div>" +
  72. "<hr/>" +
  73. '<h5 class="Sett">General Settings</h5>' +
  74. '<div class="left-modg">' +
  75. '<label class="flex">' +
  76. '<input type="text" name="keyBindingsRapidFeed" class="keybinding" value="' +
  77. rxSettings.keyBindingsRapidFeed +
  78. '" maxlength="1" onfocus="this.select()">' +
  79. '<span class="Sett">Rapid Feed</span>' +
  80. "</label>" +
  81. '<label class="flex">' +
  82. '<input type="text" name="keyBindingsdoubleSplit" class="keybinding" value="' +
  83. rxSettings.keyBindingsdoubleSplit +
  84. '" maxlength="1" onfocus="this.select()">' +
  85. '<span class="Sett">Double Split</span>' +
  86. "</label>" +
  87. '<label class="flex">' +
  88. '<input type="text" name="keyBindingsTripleSplit" class="keybinding" value="' +
  89. rxSettings.keyBindingsTripleSplit +
  90. '" maxlength="1" onfocus="this.select()">' +
  91. '<span class="Sett">Triple Split</span>' +
  92. "</label>" +
  93. '<label class="flex">' +
  94. '<input type="text" name="keyBindingsQuadSplit" class="keybinding" value="' +
  95. rxSettings.keyBindingsQuadSplit +
  96. '" maxlength="1" onfocus="this.select()">' +
  97. '<span class="Sett">Quad Split</span>' +
  98. "</label>" +
  99. "</div>" +
  100. '<div class="right-modg">' +
  101. "</div>" +
  102. "<hr/>" +
  103. '<h4 class="Sett">Discord</h4>' +
  104. '<div class="modContainer"><a href="https://discord.gg/gHmhpCaPfP" target="_blank" class="modButton" style="width: 100%;">Join Sigmally Modz Server</a></div>' +
  105. "<hr/>" +
  106. '<h4 class="Sett">Stylish Names</h4>' +
  107. '<div class="modContainer"><a href="https://www.stylishnamemaker.com" target="_blank" class="modButton">Stylish Name Maker</a><a href="https://nickfinder.com" target="_blank" class="modButton">Nickfinder</a></div>' +
  108. "<hr/>" +
  109. '<h4 class="Sett">Youtube</h4>' +
  110. '<div class="modContainer"><a href="https://www.youtube.com/@cursed9645/" target="_blank" class="modButton">Cursed</a><a href="https://www.youtube.com/channel/UCEn7a9rEtJNsw1WKgsAoyXQ" class="modButton" target="_blank">Sigmally Modz</a></div>';
  111.  
  112. const rzMods = [
  113. {
  114. modName: "Branding",
  115. modType: "automatic",
  116. modDescription: "Branding",
  117. modCode: () => {
  118. const gameTitle = document.getElementById("title");
  119. gameTitle.innerHTML = 'Sigmally<span style="display:block; font-size: 14px;">Mod by Cursed / Ringzer0</span>';
  120. },
  121. },
  122. {
  123. modName: "Game Settings",
  124. modType: "automatic",
  125. modDescription: "Extanded Game Settings",
  126. modCode: () => {
  127. const gameSettings = document.querySelector(".checkbox-grid");
  128. gameSettings.innerHTML += `
  129. <li>
  130. <div class="pretty p-svg p-round p-smooth">
  131. <input type="checkbox" id="showNames">
  132. <div class="state p-success">
  133. <svg class="svg svg-icon" viewBox="0 0 20 20">
  134. <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>
  135. </svg>
  136. <label>Names</label>
  137. </div>
  138. </div>
  139. </li>
  140. <li>
  141. <div class="pretty p-svg p-round p-smooth">
  142. <input type="checkbox" id="showSkins">
  143. <div class="state p-success">
  144. <svg class="svg svg-icon" viewBox="0 0 20 20">
  145. <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>
  146. </svg>
  147. <label>Skins</label>
  148. </div>
  149. </div>
  150. </li>
  151. <li>
  152. <div class="pretty p-svg p-round p-smooth">
  153. <input type="checkbox" id="longNick" checked>
  154. <div class="state p-success">
  155. <svg class="svg svg-icon" viewBox="0 0 20 20">
  156. <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>
  157. </svg>
  158. <label>Long Nick</label>
  159. </div>
  160. </div>
  161. </li>
  162. <li>
  163. <div class="pretty p-svg p-round p-smooth">
  164. <input type="checkbox" id="darkMenu">
  165. <div class="state p-success">
  166. <svg class="svg svg-icon" viewBox="0 0 20 20">
  167. <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>
  168. </svg>
  169. <label>Dark Menu</label>
  170. </div>
  171. </div>
  172. </li>`;
  173. },
  174. },
  175. {
  176. modName: "Rapid Feed (q)",
  177. modType: "automatic",
  178. modDescription: "You feed faster",
  179. modCode: () => {
  180. window.rxTimeouts = [];
  181. const amount = 10;
  182.  
  183. window.addEventListener("keyup", (e) => {
  184. if (e.key == rxSettings.keyBindingsRapidFeed) {
  185. for (var i = 0; i < rxTimeouts.length; i++) {
  186. clearTimeout(rxTimeouts[i]);
  187. }
  188. }
  189. });
  190. window.addEventListener("keydown", (e) => {
  191. if (e.key == "Tab") {
  192. e.preventDefault();
  193. }
  194.  
  195. if (e.key == "Escape") {
  196. rzModSettings.classList.add("hidden");
  197. }
  198.  
  199. if (e.key == rxSettings.keyBindingsRapidFeed) {
  200. window.dispatchEvent(new KeyboardEvent("keydown", KEY_FEED));
  201. window.dispatchEvent(new KeyboardEvent("keyup", KEY_FEED));
  202. window.dispatchEvent(new KeyboardEvent("keydown", KEY_FEED));
  203. window.dispatchEvent(new KeyboardEvent("keyup", KEY_FEED));
  204. window.dispatchEvent(new KeyboardEvent("keydown", KEY_FEED));
  205. window.dispatchEvent(new KeyboardEvent("keyup", KEY_FEED));
  206. window.dispatchEvent(new KeyboardEvent("keydown", KEY_FEED));
  207. window.dispatchEvent(new KeyboardEvent("keyup", KEY_FEED));
  208. window.dispatchEvent(new KeyboardEvent("keydown", KEY_FEED));
  209. window.dispatchEvent(new KeyboardEvent("keyup", KEY_FEED));
  210. for (var i = 0; i < amount; ++i) {
  211. rxTimeouts.push(
  212. setTimeout(function () {
  213. window.dispatchEvent(new KeyboardEvent("keydown", KEY_FEED));
  214. window.dispatchEvent(new KeyboardEvent("keyup", KEY_FEED));
  215. window.dispatchEvent(new KeyboardEvent("keydown", KEY_FEED));
  216. window.dispatchEvent(new KeyboardEvent("keyup", KEY_FEED));
  217. window.dispatchEvent(new KeyboardEvent("keydown", KEY_FEED));
  218. window.dispatchEvent(new KeyboardEvent("keyup", KEY_FEED));
  219. }, i)
  220. );
  221. }
  222.  
  223. return;
  224. }
  225.  
  226. if (e.key == rxSettings.keyBindingsdoubleSplit) {
  227. for (let i = 0; i < 2; ++i) {
  228. setTimeout(function () {
  229. window.dispatchEvent(new KeyboardEvent("keydown", KEY_SPLIT));
  230. window.dispatchEvent(new KeyboardEvent("keyup", KEY_SPLIT));
  231. }, i + 1);
  232. }
  233. return;
  234. }
  235.  
  236. if (e.key == rxSettings.keyBindingsTripleSplit) {
  237. window.dispatchEvent(new KeyboardEvent("keydown", KEY_SPLIT));
  238. window.dispatchEvent(new KeyboardEvent("keyup", KEY_SPLIT));
  239. window.dispatchEvent(new KeyboardEvent("keydown", KEY_SPLIT));
  240. window.dispatchEvent(new KeyboardEvent("keyup", KEY_SPLIT));
  241. window.dispatchEvent(new KeyboardEvent("keydown", KEY_SPLIT));
  242. window.dispatchEvent(new KeyboardEvent("keyup", KEY_SPLIT));
  243. return;
  244. }
  245.  
  246. if (e.key == rxSettings.keyBindingsQuadSplit) {
  247. window.dispatchEvent(new KeyboardEvent("keydown", KEY_SPLIT));
  248. window.dispatchEvent(new KeyboardEvent("keyup", KEY_SPLIT));
  249. window.dispatchEvent(new KeyboardEvent("keydown", KEY_SPLIT));
  250. window.dispatchEvent(new KeyboardEvent("keyup", KEY_SPLIT));
  251. window.dispatchEvent(new KeyboardEvent("keydown", KEY_SPLIT));
  252. window.dispatchEvent(new KeyboardEvent("keyup", KEY_SPLIT));
  253. window.dispatchEvent(new KeyboardEvent("keydown", KEY_SPLIT));
  254. window.dispatchEvent(new KeyboardEvent("keyup", KEY_SPLIT));
  255. return;
  256. }
  257. });
  258. },
  259. },
  260. {
  261. modName: "Long Nicknames",
  262. modType: "automatic",
  263. modDescription: "Allows for longer nicknames.",
  264. modCode: () => {
  265. const nickName = document.getElementById("nick");
  266. let longNick = document.getElementById("longNick");
  267. nickName.maxLength = 50;
  268.  
  269. longNick.addEventListener("change", () => {
  270. if (nickName.maxLength == 50) {
  271. nickName.maxLength = 15;
  272. } else if (nickName.maxLength == 15) {
  273. nickName.maxLength = 50;
  274. }
  275. });
  276. },
  277. }, {
  278. modName: "Dark Menu",
  279. modType: "automatic",
  280. modDescription: "Changes the menu color to darker color.",
  281. modCode: () => {
  282. setTimeout(() => {
  283. const menu = document.getElementById("menu");
  284. const rightMenu = document.querySelector(".top-users__inner");
  285. const leftMenu = document.getElementById("left-menu");
  286. const linksMenu = document.querySelector(".menu-links");
  287. const deathScreen = document.querySelector(".menu--stats-mode");
  288. const skin_text = document.getElementById("js-skin-select-icon-text");
  289. let darkM = true;
  290. let darkMode_cb = document.getElementById("darkMenu");
  291. let b_inner = document.querySelector(".body__inner");
  292. let elements = b_inner.querySelectorAll(".body__inner > :not(.body__inner), #s-skin-select-icon-text");
  293. darkMode_cb.addEventListener("change", () => {
  294. if (!darkM) {
  295. darkM = true;
  296. rxSettings.darkMode = true;
  297. localStorage.setItem("rxSettings", JSON.stringify(rxSettings));
  298. skin_text.style.color = "#fff";
  299.  
  300. menu.style.backgroundColor = "#252525";
  301. rightMenu.style.backgroundColor = "#252525";
  302. leftMenu.style.backgroundColor = "#252525";
  303. linksMenu.style.backgroundColor = "#252525";
  304. deathScreen.style.backgroundColor = "#252525";
  305.  
  306. elements.forEach((textElements) => {
  307. textElements.style.color = "#fff";
  308. });
  309. } else {
  310. darkM = false;
  311. rxSettings.darkMode = false;
  312. localStorage.setItem("rxSettings", JSON.stringify(rxSettings));
  313. skin_text.style.color = "#222";
  314. menu.style.backgroundColor = "#fff";
  315. rightMenu.style.backgroundColor = "#fff";
  316. leftMenu.style.backgroundColor = "#fff";
  317. linksMenu.style.backgroundColor = "#fff";
  318. deathScreen.style.backgroundColor = "#fff";
  319.  
  320. elements.forEach((textElements) => {
  321. textElements.style.color = "#222";
  322. });
  323. }
  324. });
  325. if (rxSettings.darkMode) {
  326. darkMode_cb.checked = true;
  327. darkM = true;
  328. skin_text.style.color = "#fff";
  329. menu.style.backgroundColor = "#252525";
  330. rightMenu.style.backgroundColor = "#252525";
  331. leftMenu.style.backgroundColor = "#252525";
  332. linksMenu.style.backgroundColor = "#252525";
  333. deathScreen.style.backgroundColor = "#252525";
  334.  
  335. elements.forEach((textElements) => {
  336. textElements.style.color = "#fff";
  337. });
  338. } else {
  339. darkM = false;
  340. darkMode_cb.checked = false;
  341. }
  342. }, 500);
  343. },
  344. },
  345. {
  346. modName: "",
  347. modType: "button",
  348. modDescription: "Mod Settings Button",
  349. modId: "SettingsButton",
  350. modCode: () => {
  351. rzModSettings.classList.toggle("hidden");
  352. },
  353. },
  354. ];
  355.  
  356. rzMods.forEach((mod) => {
  357. let modElement = null;
  358.  
  359. switch (mod.modType) {
  360. case "automatic":
  361. mod.modCode.call();
  362.  
  363. break;
  364. case "button":
  365. modElement = document.createElement("button");
  366. modElement.innerText = mod.modName;
  367. modElement.onclick = mod.modCode;
  368. modElement.title = mod.modDescription;
  369. modElement.id = mod.modId;
  370. break;
  371. }
  372.  
  373. if (modElement) {
  374. rzModWrap.append(modElement);
  375. }
  376. });
  377.  
  378. document.body.prepend(rzModWrap);
  379. document.body.prepend(rzModSettings);
  380. let Cursed__style = `
  381. *{
  382. outline: none;
  383. }
  384. .flex {
  385. display: flex;
  386. justify-content: center;
  387. }
  388. #rx-mod-settings {
  389. background: #333;
  390. padding: 30px;
  391. border-radius: 15px;
  392. width: 350px;
  393. min-height: 200px;
  394. top: 1em;
  395. left: 50%;
  396. margin-left: -175px;
  397. z-index: 99999;
  398. box-shadow: 0 0 40px #8D00FF;
  399. position: fixed;
  400. text-align: center;
  401. }
  402. #rx-mod-settings input.keybinding {
  403. max-width: 20px;
  404. border: 1px solid #ccc;
  405. padding: 0;
  406. text-align: center;
  407. margin-right: 5px;
  408. outline: none;
  409. color: #fff;
  410. background-color: transparent;
  411. border: 1px solid #fff;
  412. border-radius: 5px;
  413. font-weight: 500;
  414. }
  415. #rx-mod-settings.hidden {
  416. display: none;
  417. }
  418.  
  419. #text-block,#left_ad_block,#ad_bottom,.ad-block,.ad-block-left,.ad-block-right {
  420. display: none;
  421. }
  422. .cztop{
  423. display: flex;
  424. justify-content: space-between;
  425. align-items: center;
  426. }
  427. .SettingsTitle{
  428. font-size: 32px;
  429. color: #EEE;
  430. margin-left: 10px;
  431. }
  432. .CloseBtn{
  433. outline: none;
  434. background-color: transparent;
  435. padding: 10px;
  436. font-size: 16px;
  437. transition: all .3s;
  438. color: #fff;
  439. border-radius: 15px;
  440. border: 2px solid #4C2B8D;
  441. width: 48px;
  442. }
  443. .CloseBtn:hover{
  444. border: 2px solid #5600FF;
  445. }
  446. .Sett{
  447. color: #fff;
  448. user-select: none;
  449. font-weight: 500;
  450. }
  451. .cztopleft{
  452. display: flex;
  453. align-items: center;
  454. }
  455. .titleImg{
  456. width: 50px;
  457. height: 50px;
  458. border-radius: 20px;
  459. object-fit: cover;
  460. }
  461. .modContainer {
  462. display: flex;
  463. justify-content: space-between;
  464. }
  465. .modButton{
  466. background-color: transparent;
  467. border: 1px solid #fff;
  468. border-radius: 5px;
  469. color: #fff;
  470. transition: all .3s;
  471. outline: none;
  472. padding: 5px;
  473. width: 60%;
  474. margin: 0 5px;
  475. font-size: 13px;
  476. }
  477. .modButton:hover {
  478. background-color: #5865F2;
  479. }
  480. #SettingsButton{
  481. background-color: transparent;
  482. height: 30px;
  483. background-image: url('https://i.ibb.co/pJhSvHJ/icons8-zahnrad-30.png');
  484. width: 30px;
  485. background-size: cover;
  486. border: none;
  487. outline: none;
  488. position: fixed;
  489. top: 15%;
  490. z-index:99997;
  491. }
  492.  
  493. @media screen and (max-height: 800px) {
  494. #rx-mod-settings{
  495. top: 0
  496. }
  497. }
  498. `;
  499.  
  500. let s = document.createElement("style");
  501. s.type = "text/css";
  502. s.innerHTML = Cursed__style;
  503. (document.head || document.documentElement).appendChild(s);
  504. })();