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> </div>
</main> </main>
</div> </div>
<script src="/ui/script.js"></script> <script src="/ui/script.js?v=2"></script>
</body> </body>
</html> </html>

View File

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