From 6860f7edd46e62400ea767df1eabc5225a79ad86 Mon Sep 17 00:00:00 2001 From: miguel bracamontes Date: Sun, 18 Aug 2024 20:17:32 -0600 Subject: [PATCH] add missing styles and function to reset --- cipher.js | 10 +++++++++- index.html | 10 +++++----- style.css | 48 +++++++++++++++++++++++++++++++++++++++--------- 3 files changed, 53 insertions(+), 15 deletions(-) diff --git a/cipher.js b/cipher.js index 5b16242..d86a618 100644 --- a/cipher.js +++ b/cipher.js @@ -18,6 +18,14 @@ document.getElementById('copyText').addEventListener('click', function() { copyToClipboard(resultText); }); +document.getElementById('logoReset').addEventListener('click', function() { + // clear the content of the textarea + document.getElementById('inputText').value = ''; + + // reload the page + location.reload(); +}); + // Validate and convert input to lowercase function validateAndConvert(text) { let warningMessage = document.getElementById('warningMessage'); @@ -53,7 +61,7 @@ function displayOutput(text) { // Hide the default message and show the result container defaultMessage.style.display = 'none'; resultTextDiv.innerText = text; - resultContainer.style.display = 'block'; + resultContainer.style.display = 'flex'; } // Copy the result text to the clipboard when the user clicks the "copy" button diff --git a/index.html b/index.html index f338166..1c62dc5 100644 --- a/index.html +++ b/index.html @@ -16,15 +16,15 @@
-

a-z only, no specials

+

a-z only, no caps nor specials. hit the logo on the left to reset.

- +

@@ -34,8 +34,8 @@
Default Image -

no message processed

-

please, enter a message to encrypt/decrypt

+

no message processed

+

enter a message to encrypt/decrypt