Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/monara/public_html/test.athavaneng.com/themes.php on line 99
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 226
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 227
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 228
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 229
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 230
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 231
/**
* Teledrama Rating System - Frontend Logic
*/
document.addEventListener('DOMContentLoaded', function() {
// 1. Auto-hide alerts after 5 seconds
const alerts = document.querySelectorAll('.alert');
alerts.forEach(alert => {
setTimeout(() => {
const bsAlert = new bootstrap.Alert(alert);
bsAlert.close();
}, 5000);
});
// 2. Rating Button Interaction
// Visual feedback when a member selects a score
const ratingButtons = document.querySelectorAll('.btn-check');
ratingButtons.forEach(btn => {
btn.addEventListener('change', function() {
if (this.checked) {
// Add a small pulse effect to the label
const label = document.querySelector(`label[for="${this.id}"]`);
label.classList.add('animate-pulse');
setTimeout(() => label.classList.remove('animate-pulse'), 500);
}
});
});
// 3. Iframe Protection
// Prevents the iframe from breaking the layout on small screens
const iframes = document.querySelectorAll('iframe');
iframes.forEach(iframe => {
iframe.setAttribute('loading', 'lazy');
iframe.style.width = '100%';
});
// 4. Form Validation for Admin
// Ensures admin doesn't submit empty episodes
const forms = document.querySelectorAll('.needs-validation');
Array.from(forms).forEach(form => {
form.addEventListener('submit', event => {
if (!form.checkValidity()) {
event.preventDefault();
event.stopPropagation();
}
form.classList.add('was-validated');
}, false);
});
});
/**
* Helper: Copy Iframe Code (Useful for Admin Dashboard)
*/
function copyToClipboard(text) {
navigator.clipboard.writeText(text).then(() => {
alert('Iframe code copied to clipboard!');
});
}