We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e58aa5 commit bc61270Copy full SHA for bc61270
templates/index.html
@@ -645,6 +645,17 @@ <h4>Recommendations for Clean Code</h4>
645
646
// Initialize WASM on page load
647
window.addEventListener('load', async () => {
648
+ // Check if running on GitHub Pages
649
+ const isGitHubPages = window.location.hostname.includes('github.io');
650
+
651
+ // Disable server option if on GitHub Pages
652
+ if (isGitHubPages) {
653
+ const modeSelect = document.getElementById('modeSelect');
654
+ const serverOption = modeSelect.querySelector('option[value="server"]');
655
+ serverOption.disabled = true;
656
+ serverOption.text = 'Server (Disabled on GitHub Pages)';
657
+ }
658
659
await initWasm();
660
await showCode('simple');
661
});
0 commit comments