From 05a86c9fc521be25f1237018ae4d04efc2ab70a6 Mon Sep 17 00:00:00 2001 From: Anirudh Sharma Date: Fri, 14 Jun 2024 02:35:54 +0530 Subject: [PATCH] fixes: games number index..js --- assets/js/index.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/assets/js/index.js b/assets/js/index.js index 6bf16f73ff..482dee0c76 100644 --- a/assets/js/index.js +++ b/assets/js/index.js @@ -4,7 +4,7 @@ const generateLiTags = (gamesData, searchText = "") => { const liTags = []; searchText = searchText.trim().toLowerCase(); // Trim whitespace and convert to lowercase - for (let tagNumber = 1; tagNumber <= 418; tagNumber++) { + for (let tagNumber = 1; tagNumber <= 417; tagNumber++) { const gameData = gamesData[tagNumber.toString()]; if (gameData) { @@ -22,7 +22,9 @@ const generateLiTags = (gamesData, searchText = "") => {
${tagNumber}. ${gameTitle} 🔗 - +
@@ -163,9 +165,8 @@ document.addEventListener("DOMContentLoaded", () => { function like(button, tagNumber, gameData) { button.classList.toggle("liked"); const isLiked = button.classList.contains("liked"); - + // Store both liked state and game data in localStorage localStorage.setItem(`liked-${tagNumber}`, isLiked); localStorage.setItem(`game-${tagNumber}`, JSON.stringify(gameData)); } -