From f657f6a470b08d9ff46877b120f3d10de577226f Mon Sep 17 00:00:00 2001 From: nune <145225213+gigirassy@users.noreply.github.com> Date: Thu, 19 Dec 2024 23:46:42 -0500 Subject: [PATCH] Update client.js --- public/client.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/public/client.js b/public/client.js index f9f182a..42eff5b 100644 --- a/public/client.js +++ b/public/client.js @@ -13,6 +13,18 @@ document.addEventListener('DOMContentLoaded', async () => { setCookie('autoCopyEnabled', autoCopyCheckbox.checked, 365); }); + // Fetch ASCII art and display it + try { + const response = await fetch('/ascii'); + const data = await response.json(); + if (data.enabled) { + const asciiArtContainer = document.getElementById('asciiArtContainer'); + asciiArtContainer.textContent = data.art; + } + } catch (error) { + console.error('Failed to fetch ASCII art:', error); + } + // Handle "Go to Raw Paste" button click fetchBtn.addEventListener('click', async () => { const urlInput = pasteUrlInput.value.trim();