36837-vm/assets/js/main.js
Flatlogic Bot b358e01b21 versao2
2025-12-16 22:27:25 +00:00

25 lines
727 B
JavaScript

document.addEventListener('DOMContentLoaded', function () {
const form = document.getElementById('pagehack-form');
const toastElement = document.getElementById('liveToast');
const toast = new bootstrap.Toast(toastElement);
form.addEventListener('submit', function (event) {
event.preventDefault();
const url = document.getElementById('page_url').value;
if (!url) {
alert('Please enter a URL.');
return;
}
// Show toast notification
toast.show();
// Submit the form after a brief delay to allow the toast to be seen
setTimeout(() => {
form.submit();
}, 500); // 0.5-second delay
});
});