// === SECTION 1: Global Helper Functions === function execCmd(command) { document.execCommand(command, false, null); } function execCmdArg(command, value) { if (value || command === 'fontSize' || command === 'fontName') { document.execCommand(command, false, value); } } // === END SECTION 1 === // === SECTION 2: Notes Pane Tab Logic === function showNotesTab(tabId, buttonElement) { const tabContents = document.querySelectorAll('#notesPane .notes-tab-content'); tabContents.forEach(content => { content.classList.add('hidden-notes-content'); content.style.display = 'none'; }); const tabButtons = document.querySelectorAll('#notesPane .notes-tab-button'); tabButtons.forEach(button => { button.classList.remove('active-notes-tab'); }); const selectedTabContent = document.getElementById(tabId); if (selectedTabContent) { selectedTabContent.classList.remove('hidden-notes-content'); selectedTabContent.style.display = 'block'; } if (buttonElement) { buttonElement.classList.add('active-notes-tab'); } } // === END SECTION 2 === document.addEventListener('DOMContentLoaded', function() { // === SECTION 0: SPLASH VIDEO LOGIC (Handles both video and static splash) === const splashVideoContainer = document.getElementById('splash-box'); // This ID is for the main overlay div const splashVideoElement = document.getElementById('splashIntroVideo'); // This ID is for the