plaster/public/client.js

8 lines
370 B
JavaScript
Raw Normal View History

2024-12-18 21:21:37 +00:00
document.getElementById('fetchBtn').addEventListener('click', async () => {
const urlInput = document.getElementById('pasteUrl').value;
2024-12-18 21:57:23 +00:00
// Perform a redirection by using the input URL directly
const redirectUrl = `/fetch-paste?url=${encodeURIComponent(urlInput)}`;
window.location.href = redirectUrl; // This redirects the user to the raw paste URL
2024-12-18 21:21:37 +00:00
});