Add JavaScript modules for enhanced functionality and dynamic content loading

This commit is contained in:
MayaChat
2025-11-24 01:32:16 -05:00
parent 7caeb56def
commit 3b09920eee
7 changed files with 485 additions and 457 deletions

13
js/readme-loader.js Normal file
View File

@@ -0,0 +1,13 @@
// Fetch and render README.md
(async function loadReadme(){
try {
const response = await fetch('/README.md', {cache: 'no-cache'});
if(!response.ok) throw new Error('README not found');
const markdown = await response.text();
const html = marked.parse(markdown);
document.getElementById('readme-content').innerHTML = html;
} catch(err) {
console.error('Error loading README:', err);
document.getElementById('readme-content').innerHTML = '<p>Documentation unavailable.</p>';
}
})();