Polyglot Study Routine Planner Polyglot Study Routine Planner 1. Study Dashboard 2. Plan Your Routine 3. Data Configuration Study Dashboard Your weekly study schedule will appear here. Start by adding your languages and goals in the 'Plan Your Routine' tab. Weekly Polyglot Study Routine Download Schedule (PDF) Plan Your Routine Add the languages you are studying and their weekly focus. Settings are applied from the 'Data Configuration' tab. Add Another Language Total Available Study Hours Per Week Generate Routine Data Configuration Customize your study sessions and availability. Session Length (minutes) Break Between Sessions (minutes) Available Study Days Monday Tuesday Wednesday Thursday Friday Saturday Sunday Save Configuration Previous Next ${langCount} Weekly Sessions${sessionCount} Session Length${settings.sessionLength} min `; // Render Table const scheduleTable = document.getElementById('psrp-schedule-table'); const allDays = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]; const availableDays = settings.studyDays; let thead = ''; availableDays.forEach(day => thead += `${day}`); thead += ''; let tbody = ''; availableDays.forEach(day => { tbody += ''; if (schedule[day] && schedule[day].length > 0) { tbody += ''; schedule[day].forEach(session => tbody += `${session}`); tbody += ''; } tbody += ''; }); tbody += ''; scheduleTable.innerHTML = thead + tbody; dashboardPlaceholder.style.display = 'none'; dashboardResults.style.display = 'block'; pdfDownloadBtn.style.display = 'block'; }, saveSettings(e) { e.preventDefault(); const originalText = saveSettingsBtn.textContent; saveSettingsBtn.textContent = 'Configuration Saved!'; saveSettingsBtn.disabled = true; setTimeout(() => { saveSettingsBtn.textContent = originalText; saveSettingsBtn.disabled = false; }, 2000); }, navigateTabs(direction) { let newIndex = currentTabIndex + direction; if (newIndex < 0) newIndex = 0; if (newIndex >= tabs.length) newIndex = tabs.length - 1; if (newIndex !== currentTabIndex) tabs[newIndex].click(); }, downloadPDF() { const printContainer = document.createElement('div'); printContainer.className = 'psrp-print-container'; const toolContainer = document.getElementById('psrp-container'); if (!toolContainer) return; document.body.appendChild(printContainer); printContainer.appendChild(toolContainer); document.body.classList.add('psrp-printing'); window.print(); window.onafterprint = () => { document.body.classList.remove('psrp-printing'); const scriptTag = document.currentScript || document.querySelector('script[src=""]'); if (scriptTag && scriptTag.parentNode) { scriptTag.parentNode.insertBefore(toolContainer, scriptTag); } else { document.body.appendChild(toolContainer); } if (printContainer.parentNode) printContainer.parentNode.removeChild(printContainer); window.onafterprint = null; }; setTimeout(() => { if (document.body.classList.contains('psrp-printing')) window.onafterprint(); }, 1000); } }; window.updatePsrpNavButtons = () => { if (!prevBtn || !nextBtn || tabs.length === 0) return; tabs.forEach((tab, index) => { if (tab.classList.contains('active')) currentTabIndex = index; }); prevBtn.disabled = (currentTabIndex === 0); nextBtn.disabled = (currentTabIndex === tabs.length - 1); }; window.psrpApp.init(); });