From 3d37bbbf64e5864ba8942b6cc68978239a639ddf Mon Sep 17 00:00:00 2001 From: threememories Date: Thu, 9 Apr 2026 19:08:59 -0500 Subject: [PATCH] Add files via upload --- index.html | 170 +++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 151 insertions(+), 19 deletions(-) diff --git a/index.html b/index.html index f8f1b8d..874438f 100644 --- a/index.html +++ b/index.html @@ -365,14 +365,58 @@ button:disabled { 0 0 20px var(--pip-color) !important; /* Stacks 3 layers of glow for maximum brightness */ opacity: 1 !important; } - + +/* --- ROBCO UPDATE TICKER --- */ +.ticker-window { + height: 250px; + overflow: hidden; + position: relative; + background: rgba(0, 0, 0, 0.5); + border: 1px inset var(--pip-color); + margin-top: 15px; + padding: 10px; + text-align: left; + box-shadow: inset 0 0 15px rgba(0,0,0,0.8); +} + +.ticker-text { + position: absolute; + width: 95%; + /* 35s is the speed. Lower = faster, Higher = slower */ + animation: scrollTicker 35s linear infinite; +} + +/* Pause the scrolling when the mouse hovers over it */ +.ticker-window:hover .ticker-text { + animation-play-state: paused; +} + +@keyframes scrollTicker { + 0% { top: 100%; } + 100% { top: -200%; } +} + +.patch-version { + /* color: #ffffff; // <-- THE PATCH: Remove hardcoded white color */ + font-weight: bold; + text-shadow: 0 0 5px var(--pip-color); /* <-- THE PATCH: Apply theme-consistent glow */ + margin-top: 20px; + border-bottom: 1px dashed var(--pip-color); + display: inline-block; +} +.patch-note { + margin-bottom: 8px; + font-size: 15px; + padding-left: 10px; + border-left: 2px solid var(--pip-color); +}
-

ROBCO OS v1.5

+

ROBCO OS v1.6

@@ -454,7 +498,7 @@ button:disabled {
-

ROBCO STRAT-COMv1.5

+

ROBCO STRAT-COMv1.6

@@ -894,18 +938,83 @@ button:disabled { - +

+ [ Submit Bug Report / Suggestion ] +

+

+ To download: Save this webpage (Ctrl+S) as a single HTML file. (Music not included) +

+ +

+ Modified from the HTML5 Canvas Risk Game by Vinayak Vedantam. +

+

+ Independent, fan-made project. Not affiliated with or endorsed by Bethesda Softworks. +

+ +
-
+
Reinforcements:
Reinforcements:
Reinforcements:
@@ -937,6 +1046,13 @@ if (!document.getElementById('radstorm-styles')) { document.head.appendChild(style); } +// --- ROBCO SECURITY PROTOCOL (XSS SANITIZER) --- +function sanitizeInput(str) { + let temp = document.createElement('div'); + temp.textContent = str; + return temp.innerHTML; +} + const continents = [ { areas: ["indonesia", "new_guinea", "eastern_australia", "western_australia"], name: "The Southern Wastes", bonus: 2 }, { areas: ["brazil", "peru", "venezuela", "argentina"], name: "Amazonian Wastes", bonus: 2 }, @@ -1324,7 +1440,17 @@ Gamestate.init = function(){ closeHelpBtn?.addEventListener('click', () => { if (helpModal) helpModal.style.display = 'none'; }); - +// --- Update Ticker Listeners --- + document.getElementById('open-updates-btn')?.addEventListener('click', (e) => { + e.preventDefault(); + let updatesModal = document.getElementById('updates-modal'); + if (updatesModal) updatesModal.style.display = 'block'; + }); + + document.getElementById('close-updates-btn')?.addEventListener('click', () => { + let updatesModal = document.getElementById('updates-modal'); + if (updatesModal) updatesModal.style.display = 'none'; + }); this.injectHolidayEvents(); submitName?.addEventListener('click', this.start.bind(this)); @@ -1445,12 +1571,18 @@ this.hazardsEnabled = optRadstorms; let diffSelect = document.getElementById('chosen-difficulty'); this.difficulty = diffSelect ? diffSelect.value : "Normal"; - if (chosenLeader && chosenCountry) { - this.players[0].name = chosenLeader.value; - this.players[0].country = chosenCountry.value; - if (playerName) playerName.textContent = chosenLeader.value; - if (playerCountry) playerCountry.textContent = chosenCountry.value; +if (chosenLeader && chosenCountry) { + // Run user input through the security sanitizer before saving it + let safeLeader = sanitizeInput(chosenLeader.value); + let safeCountry = sanitizeInput(chosenCountry.value); + + this.players[0].name = safeLeader; + this.players[0].country = safeCountry; + + if (playerName) playerName.textContent = safeLeader; + if (playerCountry) playerCountry.textContent = safeCountry; } + // --- SET CUSTOM FACTION COLOR & PREVENT DUPLICATES --- if (chosenColor) { let selectedHex = chosenColor.value;