async function deleteFile(filename) { if (confirm('Are you sure you want to delete ' + filename + '?')) { const response = await fetch(`/delete_file/${filename}`, { method: 'DELETE' }); const data = await response.json(); alert(data.message); if (response.ok) { location.reload(); // Reload the page to update the file list } } } // Initial check when page loads document.addEventListener('DOMContentLoaded', () => { // No archive functions needed now });