Last active
August 27, 2025 18:10
-
-
Save MisterX2000/c0216521e6f419126034d53941720b5c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name LSS - Custom Design | |
| // @description Custom design for Leitstellenspiel | |
| // @version 1.0.0 | |
| // @author Mister X | |
| // @namespace https://gist.github.com/MisterX2000 | |
| // @homepageURL https://gist.github.com/MisterX2000/c0216521e6f419126034d53941720b5c | |
| // @updateURL https://gist.github.com/MisterX2000/c0216521e6f419126034d53941720b5c/raw/LSS-CustomDesign.user.js | |
| // @downloadURL https://gist.github.com/MisterX2000/c0216521e6f419126034d53941720b5c/raw/LSS-CustomDesign.user.js | |
| // @icon https://www.leitstellenspiel.de/favicon.ico | |
| // @include /^https?:\/\/[www.]*(?:leitstellenspiel\.de|missionchief\.co\.uk|missionchief\.com|meldkamerspel\.com|centro-de-mando\.es|missionchief-australia\.com|larmcentralen-spelet\.se|operatorratunkowy\.pl|operatore112\.it|operateur112\.fr|dispetcher112\.ru|alarmcentral-spil\.dk|nodsentralspillet\.com|operacni-stredisko\.cz|jogo-operador112\.com|operador193\.com|dyspetcher101-game\.com|missionchief-japan\.com|missionchief-korea\.com|jocdispecerat112\.com|hatakeskuspeli\.com|dispecerske-centrum\.com)\/.*$/ | |
| // @grant GM_addStyle | |
| // ==/UserScript== | |
| GM_addStyle(` | |
| .panel-heading { | |
| padding: .5rem !important; | |
| } | |
| *::-webkit-scrollbar { | |
| width: 6px !important; | |
| } | |
| *::-webkit-scrollbar-thumb { | |
| background-color: #c2c2c2 !important; | |
| } | |
| *::-webkit-scrollbar-track { | |
| background-color: #767676 !important; | |
| } | |
| *::-webkit-scrollbar-thumb:active { | |
| background-color: #fff !important; | |
| } | |
| body.bigMap #missions_outer, body.bigMap #buildings_outer, body.bigMap #chat_outer, body.bigMap #radio_outer { | |
| padding: 0 0 0 5px !important; | |
| } | |
| `); | |
| if (window.top === window.self) { | |
| window.addEventListener('load', function () { | |
| // Hire Button | |
| building_panel_heading = document.querySelector("#building-list-header-buttons") | |
| let btn_hire = document.createElement("a"); | |
| btn_hire.innerHTML = "Hire All"; | |
| btn_hire.className = "btn btn-xs btn-primary"; | |
| btn_hire.addEventListener("click", hire_all_staff); | |
| building_panel_heading.appendChild(btn_hire); | |
| function hire_all_staff() { | |
| let buildings = document.querySelectorAll('*[id^="building_button_"]'); | |
| for (const b of buildings) { | |
| let building_type = b.getAttribute('building_type'); | |
| let href = b.getAttribute("href"); | |
| // ignore building_hospital & building_leitstelle | |
| if (building_type == '4') { | |
| console.log('NOT ' + href); | |
| continue; | |
| } | |
| else if (building_type == '7') { | |
| leitstelle = b; | |
| console.log('NOT ' + href); | |
| continue; | |
| } | |
| console.log(href); | |
| fetch(href + '/hire_do/3'); | |
| } | |
| window.open(leitstelle.getAttribute("href") + '#tab_buildings', '_blank').focus(); | |
| } | |
| }, false); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name LSS - Easter Egg | |
| // @description Auto click Easter Egg on missions pages | |
| // @version 1.1.0 | |
| // @author Mister X | |
| // @namespace https://gist.github.com/MisterX2000 | |
| // @homepageURL https://gist.github.com/MisterX2000/c0216521e6f419126034d53941720b5c | |
| // @updateURL https://gist.github.com/MisterX2000/c0216521e6f419126034d53941720b5c/raw/LSS-EasterEgg.user.js | |
| // @downloadURL https://gist.github.com/MisterX2000/c0216521e6f419126034d53941720b5c/raw/LSS-EasterEgg.user.js | |
| // @icon https://www.leitstellenspiel.de/favicon.ico | |
| // @include /^https?:\/\/(?:www\.)?(?:leitstellenspiel\.de|missionchief(?:\.co\.uk|\.com|-australia\.com|-japan\.com|-korea\.com)|meldkamerspel\.com|centro-de-mando\.es|larmcentralen-spelet\.se|operatorratunkowy\.pl|operatore112\.it|operateur112\.fr|dispetcher112\.ru|alarmcentral-spil\.dk|nodsentralspillet\.com|operacni-stredisko\.cz|jogo-operador112\.com|operador193\.com|dyspetcher101-game\.com|jocdispecerat112\.com|hatakeskuspeli\.com|dispecerske-centrum\.com)\/missions\/.*$/ | |
| // ==/UserScript== | |
| (function () { | |
| "use strict"; | |
| function clickEasterEgg() { | |
| const btn = document.getElementById("easter-egg-link"); | |
| if (btn) { | |
| btn.click(); | |
| console.log("🎯 Easter Egg button clicked!"); | |
| } else { | |
| console.log("⚠️ Easter Egg button not found."); | |
| } | |
| } | |
| if (document.readyState === "complete" || document.readyState === "interactive") { | |
| clickEasterEgg(); | |
| } else { | |
| window.addEventListener("load", clickEasterEgg); | |
| } | |
| })(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "Numpad0": "LF", | |
| "Numpad1": "HLF / RW", | |
| "Numpad2": "Vepfl", | |
| "Numpad3": "RTW + NEF", | |
| "Numpad4": "DLK", | |
| "Numpad5": "FuStw (DGL)", | |
| "Numpad6": "NEF", | |
| "Numpad7": "ELW 1", | |
| "Numpad8": "FuStw", | |
| "Numpad9": "RTW", | |
| "NumpadDecimal": "RTH + RTW", | |
| "NumpadDivide": "PoMo", | |
| "NumpadMultiply": "ELW 1 (SEG)" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name LSS - OneKey & Copy Clipboad | |
| // @version 1.4.5 | |
| // @description Alamieren mit einer Taste & Einsatztitel in Clipboad kopieren | |
| // @author Mister X | |
| // @namespace https://gist.github.com/MisterX2000 | |
| // @homepageURL https://gist.github.com/MisterX2000/c0216521e6f419126034d53941720b5c | |
| // @updateURL https://gist.github.com/MisterX2000/c0216521e6f419126034d53941720b5c/raw/LSS-OneKey_Copy.user.js | |
| // @downloadURL https://gist.github.com/MisterX2000/c0216521e6f419126034d53941720b5c/raw/LSS-OneKey_Copy.user.js | |
| // @icon https://www.leitstellenspiel.de/favicon.ico | |
| // @match https://www.leitstellenspiel.de/missions/* | |
| // @grant GM_setClipboard | |
| // @grant GM_setValues | |
| // @grant GM_getValues | |
| // ==/UserScript== | |
| (function () { | |
| "use strict"; | |
| // List of e.code values for numpad keys | |
| const NUMPAD_CODES = [ | |
| "Numpad0", // LF | |
| "NumpadDecimal", // RTW + RH | |
| "Numpad1", // HLF | |
| "Numpad2", // Verpfl. | |
| "Numpad3", // RTW + NEF | |
| "Numpad4", // DLK | |
| "Numpad5", // FustW DGL | |
| "Numpad6", // NEF | |
| "Numpad7", // ELW1 | |
| "Numpad8", // FustW | |
| "Numpad9", // RTW | |
| "NumpadDivide", // - | |
| "NumpadMultiply", // ELW1 (SEG) | |
| ]; | |
| // Load or initialize keyMappings using UserScript storage | |
| async function loadKeyMappings() { | |
| const stored = await GM_getValues(NUMPAD_CODES); | |
| let keyMappings = {}; | |
| let toStore = {}; | |
| let changed = false; | |
| for (const code of NUMPAD_CODES) { | |
| let value = stored[code]; | |
| if (!value) { | |
| let userValue = prompt(`Bitte gib die AAO-ID oder Namen für Taste ${code} ein:`); | |
| if (userValue && userValue.trim() !== "") { | |
| toStore[code] = userValue.trim(); | |
| keyMappings[code] = userValue.trim(); | |
| changed = true; | |
| } | |
| } else { | |
| keyMappings[code] = value; | |
| } | |
| } | |
| if (changed) { | |
| await GM_setValues(toStore); | |
| alert("KeyMappings wurden gespeichert."); | |
| } | |
| return keyMappings; | |
| } | |
| // ========== MAIN ========== | |
| loadKeyMappings().then(function (keyMappings) { | |
| document.addEventListener("keydown", function (e) { | |
| if (keyMappings.hasOwnProperty(e.code)) { | |
| e.preventDefault(); | |
| var aao_id = keyMappings[e.code]; | |
| if (aao_id === "-") { | |
| // If the AAO ID is empty, do nothing | |
| console.log(`Keine AAO-ID für ${e.code} hinterlegt.`); | |
| return; | |
| } | |
| var aaoElement = document.getElementById("aao_" + aao_id); | |
| if (aaoElement) { | |
| aaoElement.click(); | |
| return; | |
| } | |
| // Try to find AAO by partial name (title contains aao_id) | |
| var aaoGroup = document.getElementById("mission-aao-group"); | |
| if (aaoGroup) { | |
| var aaoByName = Array.from(aaoGroup.querySelectorAll("a.aao_btn")).find(function (el) { | |
| return el.getAttribute("title") && el.getAttribute("title").includes(aao_id); | |
| }); | |
| if (aaoByName) { | |
| aaoByName.click(); | |
| return; | |
| } | |
| alert(`AAO mit ID oder Name ${aao_id} nicht gefunden für ${e.code}!`); | |
| } | |
| } else if (e.code === "NumpadEnter") { | |
| // -> Alarmieren | |
| e.preventDefault(); | |
| document.querySelector("#alert_btn").click(); | |
| } else if (e.code === "NumpadAdd") { | |
| // -> Alarmieren und weiter | |
| e.preventDefault(); | |
| document.querySelector("#alert_next_btn").click(); | |
| } else if (e.code === "NumpadSubtract") { | |
| // -> Alle Fahrzeuge laden | |
| e.preventDefault(); | |
| document.querySelector("#vehicle_list_step > .missing_vehicles_load").click() | |
| } else if (e.code === "Delete") { | |
| // -> AAO-Suchfeld leeren | |
| e.preventDefault(); | |
| const search_input = document.querySelector(".search_input"); | |
| search_input.value = ""; | |
| search_input.dispatchEvent(new Event("input")); | |
| } else if (e.code === "Insert") { | |
| // -> Einsatztitel in AAO-Suchfeld einfügen | |
| e.preventDefault(); | |
| const search_input = document.querySelector(".search_input"); | |
| search_input.value = missionTitle; | |
| search_input.dispatchEvent(new Event("input")); | |
| } | |
| }); | |
| // Copy mission title to clipboard | |
| const missionTitle = document.getElementById("mission_general_info").getAttribute("data-mission-title").trim(); | |
| GM_setClipboard(missionTitle, "text"); | |
| }); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment