From 246453776df62dc2ca5467e49daf7ac40c79279c Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Bajpai Date: Wed, 5 Aug 2026 18:08:42 +0530 Subject: [PATCH] fix: resolve 4 bugs in leetcode-ranking --- frontend/js/boot.js | 2 +- frontend/js/matrix.js | 2 +- scripts/analyze-inactivity.js | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/js/boot.js b/frontend/js/boot.js index fcc2eff9..4cda3565 100644 --- a/frontend/js/boot.js +++ b/frontend/js/boot.js @@ -47,7 +47,7 @@ document.addEventListener("DOMContentLoaded", () => { text = text.replace("[OK]", '[OK]'); } - line.innerHTML = text; + line.textContent = text; bootInner.appendChild(line); // Auto scroll to bottom diff --git a/frontend/js/matrix.js b/frontend/js/matrix.js index cfb530d7..4ce05e06 100644 --- a/frontend/js/matrix.js +++ b/frontend/js/matrix.js @@ -94,5 +94,5 @@ document.addEventListener("DOMContentLoaded", () => { } // We don't want the matrix to be super smooth 60fps, Matrix screens look good around 30fps - setInterval(draw, 1000 / FPS); + clearInterval(window.__interval); window.__interval = setInterval(draw, 1000 / FPS); }); diff --git a/scripts/analyze-inactivity.js b/scripts/analyze-inactivity.js index 8c327766..891e1fdd 100644 --- a/scripts/analyze-inactivity.js +++ b/scripts/analyze-inactivity.js @@ -118,3 +118,5 @@ async function fetchData(url) { process.exit(1); } })(); + +.catch(err => console.error("Promise.all failed:", err)); \ No newline at end of file