mirror of
https://github.com/gigirassy/plaster.git
synced 2024-12-23 18:39:07 +00:00
Update client.js
This commit is contained in:
parent
7df9789695
commit
f657f6a470
@ -13,6 +13,18 @@ document.addEventListener('DOMContentLoaded', async () => {
|
|||||||
setCookie('autoCopyEnabled', autoCopyCheckbox.checked, 365);
|
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
|
// Handle "Go to Raw Paste" button click
|
||||||
fetchBtn.addEventListener('click', async () => {
|
fetchBtn.addEventListener('click', async () => {
|
||||||
const urlInput = pasteUrlInput.value.trim();
|
const urlInput = pasteUrlInput.value.trim();
|
||||||
|
Loading…
Reference in New Issue
Block a user