36837-vm/assets/js/main.js
Flatlogic Bot 78c8d8c40d VERSAO 1
2025-12-10 17:06:23 +00:00

27 lines
894 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('url').value;
if (!url) {
alert('Please enter a URL.');
return;
}
// Show toast notification
toast.show();
// You can add an AJAX call here later to submit the form asynchronously
// For now, it just shows a notification.
console.log('Form submitted with URL:', url);
console.log('Language:', document.getElementById('language').value);
// Optional: clear the form after submission
// form.reset();
});
});