From 0d16a2f9f26b05aa509aa4b1abb0cdadad93a5b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ph=C3=B6nix=2064?= Date: Tue, 15 Apr 2025 14:55:36 +0200 Subject: [PATCH 1/3] Added Continous Mode button and functionality --- src/index.html | 21 +++++++++++++++++++++ src/js/app.js | 3 ++- src/js/inputs.js | 3 +++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/index.html b/src/index.html index b5617aa..03973bd 100644 --- a/src/index.html +++ b/src/index.html @@ -361,6 +361,27 @@
Responding Station Settings
/> + +
+ + +
+
diff --git a/src/js/app.js b/src/js/app.js index 0d5e604..a9411b5 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -494,6 +494,7 @@ function send() { stn.farnsworthSpeed = Math.max( 5, stn.farnsworthSpeed - farnsworthLowerBy + ); } else { stn.enableFarnsworth = true; @@ -831,7 +832,7 @@ function tu() { responseField.focus(); // Chance of a new station joining - if (Math.random() < 0.4) { + if (Math.random() < 0.4 || document.getElementById('enableContinuous').checked) { addStations(currentStations, inputs); } diff --git a/src/js/inputs.js b/src/js/inputs.js index e07f38b..610cfbd 100644 --- a/src/js/inputs.js +++ b/src/js/inputs.js @@ -41,6 +41,9 @@ function getDOMInputs() { // convert volume to a float between 0 and 1 yourVolume: parseFloat(document.getElementById('yourVolume').value) / 100, maxStations: parseInt(document.getElementById('maxStations').value, 10), + enableContinuous: document.getElementById('enableContinuous') + ? document.getElementById('enableContinuous').checked + : false, minSpeed: parseInt(document.getElementById('minSpeed').value, 10), maxSpeed: parseInt(document.getElementById('maxSpeed').value, 10), minTone: parseInt(document.getElementById('minTone').value, 10), From 09fc29035ac223d3cd974bd590d89de3c7274b82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ph=C3=B6nix=2064?= Date: Wed, 23 Apr 2025 11:57:45 +0200 Subject: [PATCH 2/3] Saved all input fileds using new dynamic system and created reset logic --- src/index.html | 50 +++++++++ src/js/app.js | 295 ++++++++++++++++++++++++++++++------------------- 2 files changed, 233 insertions(+), 112 deletions(-) diff --git a/src/index.html b/src/index.html index 03973bd..61d181d 100644 --- a/src/index.html +++ b/src/index.html @@ -127,6 +127,7 @@

Mode

value="single" autocomplete="off" checked + data-persist="true" />
+
+ +

@@ -232,6 +242,7 @@
Your Station Settings
autocapitalize="characters" spellcheck="false" autocorrect="off" + data-persist="true" />
@@ -247,6 +258,7 @@
Your Station Settings
autocapitalize="characters" spellcheck="false" autocorrect="off" + data-persist="true" />
@@ -263,6 +275,7 @@
Your Station Settings
autocapitalize="characters" spellcheck="false" autocorrect="off" + data-persist="true" />
@@ -279,6 +292,7 @@
Your Station Settings
max="100" step="1" required + data-persist="true" />
@@ -295,6 +309,7 @@
Your Station Settings
max="9999" step="1" required + data-persist="true" />
@@ -311,6 +326,7 @@
Your Station Settings
max="100" step="1" required + data-persist="true" />
@@ -358,6 +374,7 @@
Responding Station Settings
max="100" step="1" required + data-persist="true" /> @@ -368,6 +385,7 @@
Responding Station Settings
class="btn-check" id="enableContinuous" autocomplete="off" + data-persist="true" onchange=" document.getElementById('enableContinuousLabel').innerHTML = `Continuous Mode`; @@ -394,6 +412,7 @@
Responding Station Settings
min="1" max="100" step="1" + data-persist="true" required />
@@ -411,6 +430,7 @@
Responding Station Settings
min="1" max="100" step="1" + data-persist="true" required /> @@ -422,6 +442,7 @@
Responding Station Settings
class="btn-check" id="enableFarnsworth" autocomplete="off" + data-persist="true" onchange=" document.getElementById('enableFarnsworthLabel').innerHTML = `Farnsworth`; @@ -451,6 +472,7 @@
Responding Station Settings
min="1" max="100" step="1" + data-persist="true" required disabled /> @@ -470,6 +492,7 @@
Responding Station Settings
min="1" max="9999" step="1" + data-persist="true" required />
@@ -485,6 +508,7 @@
Responding Station Settings
min="1" max="9999" step="1" + data-persist="true" required /> @@ -499,6 +523,7 @@
Responding Station Settings
min="0" max="100" step="1" + data-persist="true" required />
@@ -514,6 +539,7 @@
Responding Station Settings
min="0" max="100" step="1" + data-persist="true" required /> @@ -532,6 +558,7 @@
Responding Station Settings
min="0" max="2" step="0.25" + data-persist="true" required /> @@ -550,6 +577,7 @@
Responding Station Settings
min="0" max="5" step="0.25" + data-persist="true" required /> @@ -565,6 +593,7 @@
Responding Station Settings
autocomplete="off" id="usOnly" checked + data-persist="true" onchange=" document.getElementById('usOnlyLabel').innerHTML = `US Only Callsigns`; @@ -593,6 +622,7 @@
Responding Station Settings
class="btn-check" id="1x1" autocomplete="off" + data-persist="true" /> @@ -601,6 +631,7 @@
Responding Station Settings
class="btn-check" id="1x2" autocomplete="off" + data-persist="true" checked /> @@ -610,6 +641,7 @@
Responding Station Settings
class="btn-check" id="2x1" autocomplete="off" + data-persist="true" checked /> @@ -619,6 +651,7 @@
Responding Station Settings
class="btn-check" id="2x2" autocomplete="off" + data-persist="true" checked /> @@ -628,6 +661,7 @@
Responding Station Settings
class="btn-check" id="1x3" autocomplete="off" + data-persist="true" checked /> @@ -637,6 +671,7 @@
Responding Station Settings
class="btn-check" id="2x3" autocomplete="off" + data-persist="true" checked /> @@ -655,6 +690,7 @@
Responding Station Settings
type="checkbox" class="btn-check" autocomplete="off" + data-persist="true" id="enableCutNumbers" onchange="document.getElementById('enableCutNumbersLabel').innerHTML = `Enable Cut Numbers`; @@ -684,6 +720,7 @@
Responding Station Settings
class="btn-check" id="cutT" autocomplete="off" + data-persist="true" checked />