<script>
document.addEventListener("DOMContentLoaded", function() {
// Function to set the calendar to show September or the current month
function showNovemberOrCurrentMonth() {
let today = new Date();
let currentMonth = today.getMonth();
let targetMonth = 8; // September (0-indexed)
// If it's after September, do nothing
if (currentMonth > targetMonth) {
return;
}
let monthDiff = targetMonth - currentMonth;
// Function to click the next button
function clickNextButton(times) {
let calendarNextButton = document.querySelector('.yui3-calendarnav-nextmonth');
if (calendarNextButton) {
for (let i = 0; i < times; i++) {
calendarNextButton.click();
}
} else {
}
}
// Wait for the calendar to load using MutationObserver
const observer = new MutationObserver((mutations, obs) => {
const calendarLoaded = document.querySelector('.yui3-calendarnav-nextmonth');
if (calendarLoaded) {
clickNextButton(monthDiff);
obs.disconnect(); // Stop observing
}
});
// Start observing the target element for changes
observer.observe(document, {
childList: true,
subtree: true
});
}
showNovemberOrCurrentMonth();
});
</script>