// Wait for both DOM and Vue to be ready
function waitForVueThenFormatDate() {
const dateElement = document.getElementById('newspaper-date');
if (dateElement) {
const daysOfWeek = ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'];
const today = new Date();
const dayOfWeek = daysOfWeek[today.getDay()];
const day = today.getDate();
const month = String(today.getMonth() + 1).padStart(2, '0');
const year = today.getFullYear();
dateElement.innerHTML = `عدد :: ${dayOfWeek} ${day}-${month}-${year}`;
} else {
// Retry after short delay if element not found yet
setTimeout(waitForVueThenFormatDate, 100);
}
}
// Start the process when DOM is loaded
document.addEventListener('DOMContentLoaded', waitForVueThenFormatDate);
const containerSubscription = document.querySelector('.custom-subscription-widget');
setTimeout(() => {
containerSubscription.style.background = "#e9e9e9";
}, 2000);