From 26291f7d28fd2d18459eb0b1879b43800ea7fcef Mon Sep 17 00:00:00 2001 From: Kharec Date: Mon, 2 Mar 2026 07:35:36 +0100 Subject: [PATCH] clean: format --- src/html.gleam | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/html.gleam b/src/html.gleam index 581f7c1..6b4d374 100644 --- a/src/html.gleam +++ b/src/html.gleam @@ -135,7 +135,7 @@ fn decrypt_js(encrypted_content: String) -> String { try { let keyBase64 = hash.replace(/-/g, '+').replace(/_/g, '/'); while (keyBase64.length % 4) keyBase64 += '='; - + const encryptedBytes = Uint8Array.from(atob(encryptedContent), c => c.charCodeAt(0)); const keyBytes = Uint8Array.from(atob(keyBase64), c => c.charCodeAt(0)); const iv = encryptedBytes.slice(0, 12); @@ -218,19 +218,19 @@ function showShareUrl(url) { document.getElementById('paste-form')?.addEventListener('submit', async (e) => { e.preventDefault(); - + const submitButton = e.target.querySelector('button[type=\"submit\"]'); const contentInput = document.getElementById('content'); const encryptedInput = document.getElementById('encrypted-content'); const csrfInput = document.getElementById('csrf-token'); - + if (!contentInput || !encryptedInput || !csrfInput) { console.error('Required form elements not found'); return; } - + if (submitButton) submitButton.disabled = true; - + try { const content = contentInput.value; const { encrypted, key } = await encryptContent(content);