Fix examples page iframe URL

This commit is contained in:
Diego Marcos Segura
2025-05-31 01:03:49 -07:00
parent 3d16a130b1
commit a9c0ba4ce3
+2 -4
View File
@@ -221,14 +221,12 @@
panel.querySelectorAll('.example-link').forEach((link) => {
link.addEventListener('click', (e) => {
e.preventDefault();
const path = link.getAttribute('href').substring(1);
const path = link.getAttribute('href');
iframe.src = path;
console.log('path:', path);
document.querySelectorAll('.example-link').forEach(l => l.classList.remove('active'));
link.classList.add('active');
codeButton.href = `https://github.com/forge-gfx/forge/blob/main/${path}`;
console.log('codeButton href:', codeButton.href);
codeButton.href = `https://github.com/forge-gfx/forge/blob/main/${path.substring(1)}`;
});
});
}