Science Glossary Generator
Create, organize, and export a glossary of scientific terms by domain.
Explore the generated glossary. Use the filter below to view terms specific to a scientific domain.
Define Glossary Terms
No terms found for the domain: ${sgg_currentFilterDomain}.
`; return; } // 4. Render Glossary Entries filteredTerms.forEach(item => { const entryDiv = document.createElement('div'); entryDiv.className = 'sgg-glossary-entry p-4 pl-6 bg-white rounded-r-lg shadow-sm border-gray-300'; entryDiv.innerHTML = `${sgg_escapeHTML(item.term)}
Domain: ${sgg_escapeHTML(item.domain)}
${sgg_escapeHTML(item.definition)}
`; targetDiv.appendChild(entryDiv); }); } function sgg_populateFilterOptions() { const uniqueDomains = sgg_getUniqueDomains(); if (!sgg_filterDomain) return; // Clear existing options except the default sgg_filterDomain.innerHTML = ''; uniqueDomains.forEach(domain => { const option = document.createElement('option'); option.value = domain; option.textContent = domain; if (domain === sgg_currentFilterDomain) { option.selected = true; } sgg_filterDomain.appendChild(option); }); } function sgg_updateFilter() { sgg_currentFilterDomain = sgg_filterDomain.value; sgg_renderDashboard(); } // --- PDF Generation and Management --- function sgg_renderPdfClone() { const date = new Date().toLocaleDateString('en-US'); const domainTitle = sgg_currentFilterDomain ? ` (${sgg_currentFilterDomain} Only)` : ' (Full Glossary)'; sgg_pdfRenderClone.innerHTML = `Science Glossary
Generated on: ${date}${domainTitle}
