From d9d93d852266a65b613e722b55c610fc8eb4a0ba Mon Sep 17 00:00:00 2001 From: Eri Date: Mon, 19 Jan 2026 16:59:26 +0100 Subject: [PATCH] Changed textbot to text only. Updated logic as well. --- static/js/main.js | 8 ++++---- templates/index.html | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/static/js/main.js b/static/js/main.js index df1f932..81dd99e 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -46,22 +46,22 @@ hashBtn.addEventListener('click', async () => { } const data = await res.json(); - result.value = data.hash; + result.textContent = data.hash; }); clearBtn.addEventListener('click', () => { password.value = ''; salt.value = ''; - result.value = ''; + result.textContent = 'Result will appear here'; }); resultBtn.addEventListener('click', async () => { - if (!result.value) { + if (!result.textContent || result.textContent === 'Result will appear here') { alert('Nothing to copy.'); } try { - await navigator.clipboard.writeText(result.value); + await navigator.clipboard.writeText(result.textContent); alert('Copied to clipboard.'); } catch (err) { alert('Failed to copy: ' + err); diff --git a/templates/index.html b/templates/index.html index bd160d9..1cc7ecd 100644 --- a/templates/index.html +++ b/templates/index.html @@ -37,9 +37,9 @@ - + +
Result will appear here
-