From 8e5a06540cc14be0e540fa42f46a87114ff50eff Mon Sep 17 00:00:00 2001 From: Azgaar Date: Fri, 21 Jun 2024 17:34:50 +0200 Subject: [PATCH 1/2] chore: supporters update --- index.html | 2 +- modules/dynamic/supporters.js | 30 +++++++++++++++++++++++++++++- modules/ui/options.js | 2 +- 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 9ad71c88..b21696dd 100644 --- a/index.html +++ b/index.html @@ -8072,7 +8072,7 @@ - + diff --git a/modules/dynamic/supporters.js b/modules/dynamic/supporters.js index 2c608cb4..f50055b1 100644 --- a/modules/dynamic/supporters.js +++ b/modules/dynamic/supporters.js @@ -546,4 +546,32 @@ Noah Morris Phil Karecki Matthew Jarocki Lucius Licinius Lucullus -Andrew Haney`; +Andrew Haney +Noah Morris +Phil Karecki +Matthew Jarocki +Lucius Licinius Lucullus +Andrew Haney +Jesse Luke +Lord_Luce +Neko no Maigo +Hossyboy +Yasui Masatake +Jesse Roy +Remain +Douglas Rector +J Clark +Raine Logan +Matty Ice +DieMuetze +Dan Popoli +Marwyn +Kederalia +Whyse Wytch +Elliyevee +James Miller +Pirate Fish +David Leitner +Vyritecht +emre +Don't mail me`; diff --git a/modules/ui/options.js b/modules/ui/options.js index ea6d7e53..8b9e12a7 100644 --- a/modules/ui/options.js +++ b/modules/ui/options.js @@ -76,7 +76,7 @@ document // show popup with a list of Patreon supportes (updated manually) async function showSupporters() { - const {supporters} = await import("../dynamic/supporters.js?v=1.93.08"); + const {supporters} = await import("../dynamic/supporters.js?v=1.97.14"); const list = supporters.split("\n").sort(); const columns = window.innerWidth < 800 ? 2 : 5; From e1c7305f71421898a58068d027e407a6d2c5cb96 Mon Sep 17 00:00:00 2001 From: Azgaar Date: Mon, 24 Jun 2024 17:22:20 +0200 Subject: [PATCH 2/2] feat: Update military overview UI to use lowercase data attributes --- index.html | 2 +- modules/ui/military-overview.js | 8 +++++--- versioning.js | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index b21696dd..c51c8154 100644 --- a/index.html +++ b/index.html @@ -8101,7 +8101,7 @@ - + diff --git a/modules/ui/military-overview.js b/modules/ui/military-overview.js index 7c83c757..2382cb27 100644 --- a/modules/ui/military-overview.js +++ b/modules/ui/military-overview.js @@ -55,7 +55,9 @@ function overviewMilitary() { for (const u of options.military) { const label = capitalize(u.name.replace(/_/g, " ")); insert( - `
${label} 
` + `
${label} 
` ); } header.querySelectorAll(".removable").forEach(function (e) { @@ -77,7 +79,7 @@ function overviewMilitary() { const total = options.military.reduce((s, u) => s + getForces(u) * u.crew, 0); const rate = (total / population) * 100; - const sortData = options.military.map(u => `data-${u.name}="${getForces(u)}"`).join(" "); + const sortData = options.military.map(u => `data-${u.name.toLowerCase()}="${getForces(u)}"`).join(" "); const lineData = options.military .map(u => `
${getForces(u)}
`) .join(" "); @@ -469,7 +471,7 @@ function overviewMilitary() { body.querySelectorAll(":scope > div").forEach(function (el) { data += el.dataset.id + ","; data += el.dataset.state + ","; - data += units.map(u => el.dataset[u]).join(",") + ","; + data += units.map(u => el.dataset[u.toLowerCase()]).join(",") + ","; data += el.dataset.total + ","; data += el.dataset.population + ","; data += rn(el.dataset.rate, 2) + "%,"; diff --git a/versioning.js b/versioning.js index af9ff6e5..5c5f3961 100644 --- a/versioning.js +++ b/versioning.js @@ -1,7 +1,7 @@ "use strict"; // version and caching control -const version = "1.97.14"; // generator version, update each time +const version = "1.97.15"; // generator version, update each time { document.title += " v" + version;