Hopefully?

This commit is contained in:
N0\A
2026-01-09 00:45:01 +01:00
parent d936ac872a
commit 3131fd3531
2 changed files with 9 additions and 7 deletions

View File

@@ -150,6 +150,6 @@
</div>
</main>
</div>
<script src="/ui/script.js"></script>
<script src="/ui/script.js?v=2"></script>
</body>
</html>

View File

@@ -66,7 +66,7 @@ document.addEventListener("DOMContentLoaded", () => {
isFetching = true;
status.textContent = "Thinking...";
statusIndicator.classList.add("fetching");
if (statusIndicator) statusIndicator.classList.add("fetching");
const n = parseInt(nGramSelect.value);
const temperature = parseFloat(tempInput.value);
@@ -95,7 +95,7 @@ document.addEventListener("DOMContentLoaded", () => {
} finally {
isFetching = false;
status.textContent = "Idle";
statusIndicator.classList.remove("fetching");
if (statusIndicator) statusIndicator.classList.remove("fetching");
}
};
@@ -167,10 +167,12 @@ document.addEventListener("DOMContentLoaded", () => {
}
});
if (generateBtn) {
generateBtn.addEventListener("click", () => {
fetchPrediction(editor.value, 50);
closeSidebarOnMobile();
});
}
// Sync scroll
editor.addEventListener("scroll", () => {