Skip to content Using Centerville City Schools Mail with screen readers 42 of 1,038 (no subject) Inbox Paxtin Butts Wed, Oct 7, 2:29 PM (8 days ago) to me Science Tutoring Hub — Interactive Learning Library
… lessons
… subjects
…

Welcome to the Science Tutoring Hub

Explore our curated library of interactive lessons, hands-on simulations, and study activities — organised by subject and ready to launch in your browser. No downloads, no accounts, just learn.

Loading…
Sort:
` ); win.document.close(); }) .catch(err => { win.document.open(); win.document.write(`

Failed to Load Lesson

${esc(err.message)}

`); win.document.close(); }); }; /* ─── Close modal ───────────────────────────────────── */ function closePlayer() { document.getElementById('overlay').classList.remove('open'); document.getElementById('game-frame').src = ''; document.getElementById('frame-loading').classList.remove('hidden'); document.body.style.overflow = ''; currentGame = null; } /* ─── Player bar buttons ────────────────────────────── */ document.getElementById('btn-close').onclick = closePlayer; document.getElementById('overlay').addEventListener('click', function(e){ if (e.target === this) closePlayer(); }); document.getElementById('btn-fullscreen').onclick = function() { const frame = document.getElementById('game-frame'); const req = frame.requestFullscreen || frame.webkitRequestFullscreen || frame.mozRequestFullScreen; if (req) req.call(frame); }; document.getElementById('btn-stealth').onclick = function() { if (currentGame) stealthGame(currentGame.slug); }; /* ─── Search ────────────────────────────────────────── */ let searchTimer; const searchInput = document.getElementById('search'); const searchClear = document.getElementById('search-clear'); searchInput.addEventListener('input', function() { searchClear.classList.toggle('visible', this.value.length > 0); clearTimeout(searchTimer); searchTimer = setTimeout(applyFilters, 180); }); searchClear.onclick = function() { searchInput.value = ''; searchClear.classList.remove('visible'); applyFilters(); searchInput.focus(); }; /* ─── Sort ──────────────────────────────────────────── */ document.getElementById('sort-select').addEventListener('change', function() { applySort(); displayedN = 0; renderGrid(true); }); /* ─── Load more ─────────────────────────────────────── */ document.getElementById('btn-load-more').onclick = function() { renderGrid(false); }; /* ─── Infinite scroll ───────────────────────────────── */ let scrollRaf = false; window.addEventListener('scroll', function() { if (scrollRaf) return; scrollRaf = true; requestAnimationFrame(function() { const scrolled = window.scrollY; document.getElementById('scroll-top').classList.toggle('visible', scrolled > 600); if (displayedN < filtered.length) { const nearBottom = window.innerHeight + scrolled >= document.body.scrollHeight - 800; if (nearBottom) renderGrid(false); } scrollRaf = false; }); }, { passive: true }); /* ─── Keyboard shortcuts ────────────────────────────── */ document.addEventListener('keydown', function(e) { const overlay = document.getElementById('overlay'); if (e.key === 'Escape') { if (overlay.classList.contains('open')) { closePlayer(); return; } searchInput.blur(); return; } if (e.key === '/' && document.activeElement !== searchInput && !overlay.classList.contains('open')) { e.preventDefault(); searchInput.focus(); return; } if ((e.key === 'f' || e.key === 'F') && overlay.classList.contains('open') && document.activeElement !== searchInput) { document.getElementById('btn-fullscreen').click(); } }); /* ─── Boot ──────────────────────────────────────────── */ init(); })();