commit 338ee035156d47230ee7a56984c84ebf6f95f2d5 Author: adrian Date: Tue Feb 10 21:53:25 2026 +0100 first commit diff --git a/index.html b/index.html new file mode 100644 index 0000000..b794797 --- /dev/null +++ b/index.html @@ -0,0 +1,35 @@ + + + + + + + TSB Helper + + +
Whitespaces aus Modellcode entfernen
+
+ + +
+ +
+
+
+ +
+
+ +
Produktionsdatum Auslesen
+
+ + +
+
+ + + diff --git a/index.js b/index.js new file mode 100644 index 0000000..c0d4beb --- /dev/null +++ b/index.js @@ -0,0 +1,27 @@ +const unstrippedInput = document.getElementById("removeWhiteSpaceInput"); +const responseText = document.getElementById("responseText"); + +unstrippedInput.addEventListener("keydown", function (event) { + if (event.key === "Enter") { + removeWhiteSpace(); + } +}); + +function removeWhiteSpace() { + const userinput = unstrippedInput.value; + if (userinput != "") { + const strippedInput = userinput.replace(/ /g, ""); + strippedInput.trim(); + responseText.textContent = strippedInput; + + unstrippedInput.value = ""; + + copyToClipboard(); + } +} + +function copyToClipboard() { + const text_to_copy = responseText.textContent; + + navigator.clipboard.writeText(text_to_copy); +} diff --git a/style.css b/style.css new file mode 100644 index 0000000..c2efa01 --- /dev/null +++ b/style.css @@ -0,0 +1,64 @@ +body { + background-color: #2b2a34; +} + +.replaceTitle { + display: flex; + justify-content: center; + color: white; +} +.inputField { + display: flex; + justify-content: center; +} +.removeWhiteSpaceInput { + border: 2px solid black; + border-radius: 5px; +} +.responseField { + display: flex; + justify-content: center; + align-items: center; + max-width: fit-content; + margin: 5px auto; +} +.responseText { + display: flex; + justify-content: center; + border: 2px solid black; + border-radius: 5px; + max-width: 300px; + margin: 5px auto; + background-color: white; + width: 200px; + height: 20px; +} +.responseButton { + display: flex; + justify-content: center; +} +.prodDateTitle { + display: flex; + justify-content: center; + color: white; +} + +.prodDateField { + display: flex; + justify-content: center; + align-items: center; + max-width: fit-content; + margin: 5px auto; +} + +.prodDateInput { + display: flex; + justify-content: center; + border: 2px solid black; + border-radius: 5px; + max-width: 300px; + margin: 5px auto; + background-color: white; + width: 200px; + height: 20px; +}