Files
youtube-sync-docker/static/script.js
azcomputerguru b3f378a8ef Add web UI for configuration and management
- Flask-based web interface on port 8080
- Dashboard with channel statistics and sync status
- Channel management (add/remove channels via UI)
- Settings page for all configuration options
- Cookie file upload interface
- Real-time log viewer
- Manual sync trigger from web UI
- Updated Dockerfile to include Flask and web assets
- Updated Unraid template with WebUI port
- Updated README with web UI documentation
2026-05-08 19:00:36 -04:00

35 lines
996 B
JavaScript

// Auto-dismiss alerts after 5 seconds
document.addEventListener('DOMContentLoaded', function() {
const alerts = document.querySelectorAll('.alert');
alerts.forEach(alert => {
setTimeout(() => {
alert.style.opacity = '0';
alert.style.transition = 'opacity 0.5s';
setTimeout(() => alert.remove(), 500);
}, 5000);
});
});
// Confirm navigation away from form if modified
document.addEventListener('DOMContentLoaded', function() {
const forms = document.querySelectorAll('form');
forms.forEach(form => {
let formModified = false;
form.addEventListener('input', () => {
formModified = true;
});
form.addEventListener('submit', () => {
formModified = false;
});
window.addEventListener('beforeunload', (e) => {
if (formModified) {
e.preventDefault();
e.returnValue = '';
}
});
});
});