Skip to content

Commit

Permalink
Merge pull request #4507 from anisharma07/feature-branch
Browse files Browse the repository at this point in the history
Enhancement: All games recovered and 3D box game URL fixed
  • Loading branch information
kunjgit authored Jun 16, 2024
2 parents f566955 + 52b55d3 commit 472c939
Show file tree
Hide file tree
Showing 3 changed files with 224 additions and 296 deletions.
278 changes: 125 additions & 153 deletions assets/js/gamesData.json
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@
},
"116": {
"gameTitle": "3d Box",
"gameUrl": "3d_Box Game",
"gameUrl": "3d_Box_Game",
"thumbnailUrl": "3d_Box.webp"
},
"117": {
Expand Down Expand Up @@ -1585,12 +1585,12 @@
"gameUrl": "Lady_Tiger_Hunter",
"thumbnailUrl": ""
},
"316": {
"316": {
"gameTitle": "Stone Paper Scissor",
"gameUrl": "Stone_Paper_Scissor",
"thumbnailUrl": "favicon.webp"
},

"317": {
"gameTitle": "Flashlight Pointer Game",
"gameUrl": "Flashlight_Pointer_Game",
Expand Down Expand Up @@ -1940,192 +1940,164 @@
"gameTitle": "Bulls_and_Cows",
"gameUrl": "Bulls_and_Cows",
"thumbnailUrl": "bulls-and-cows.png"

},
"387":{

"387": {
"gameTitle": "Earth_Guardian",
"gameUrl": "Earth_Guardian",
"thumbnailUrl": "Earth_Guardian.png"
},
"388":{

"gameTitle" : "Technical_Mind_Game",
"gameUrl" : "Technical_Mind_Game",
"thumbnailUrl" : "Technical_Mind_Game.png"
},
"389":{
"388": {
"gameTitle": "Technical_Mind_Game",
"gameUrl": "Technical_Mind_Game",
"thumbnailUrl": "Technical_Mind_Game.png"
},
"389": {
"gameTitle": "Memory Cards Game",
"gameUrl": "Memory_Cards_Game",
"thumbnailUrl": "Memory_Cards_Game.png"
},
"390":{
"390": {
"gameTitle": "escaperoom",
"gameUrl": "escaperoom",
"thumbnailUrl": "escaperoom.png"
},
"391":{
"391": {
"gameTitle": "Dice Roller",
"gameUrl": "Dice_Roller",
"thumbnailUrl": "Dice_Roller.png"

},
"392":{
"392": {
"gameTitle": "Dragon Tower",
"gameUrl": "Dragon_Tower",
"thumbnailUrl": "Dragon_Tower.png"
},
"412":{

"gameTitle": "Chrome_Dino_Game",
"393": {
"gameTitle": "Chrome_Dino_Game",
"gameUrl": "Chrome_Dino_Game",
"thumbnailUrl": "Chrome_Dino_Game.png"


},

"394":{
"gameTitle": "path finder puzzle",
"gameUrl": "path_finder",
"thumbnailUrl": "pathfinder.png"
"394": {
"gameTitle": "path finder puzzle",
"gameUrl": "path_finder",
"thumbnailUrl": "pathfinder.png"
},

"401":{

"395": {
"gameTitle": "Chess.com",
"gameUrl": "Chess.com",
"thumbnailUrl": "Chess.com.jpg"


},
"399":{

"gameUrl": "Chess.com",
"thumbnailUrl": "Chess.com.jpg"
},
"396": {
"gameTitle": "Brick_and_Ball",
"gameUrl": "Brick_and_Ball",
"thumbnailUrl": "Brick_and_Ball.png"

},

"413":{

"397": {
"gameTitle": "Dot Connect",
"gameUrl": "Dot_Connect",
"thumbnailUrl": "Dot_Connect.png"
},

},

"396":{
"gameTitle": "path finder puzzle",
"gameUrl": "path_finder",
"thumbnailUrl": "pathfinder.png"
},
"414":{
"gameTitle": "NameFate",
"gameUrl": "namefate",
"thumbnailUrl": "namefate.png"
}
,
"500":{
"gameTitle": "Menja block breaker",
"gameUrl": "Menja_block_breaker",
"thumbnailUrl": "menja_Block_breaker.png"
},
"393":{

"gameTitle": "Pop My Balloon",
"gameUrl": "Pop_My_Balloon",
"thumbnailUrl": "Pop_My_Balloon.png"

},
"397":{
"gameTitle": "Tower Stack",
"gameUrl": "Tower_Stack",
"thumbnailUrl": "Tower_Stack.png"

},
"395":{

"gameTitle": "Virtual Pet Game",
"gameUrl": "Virtual_Pet_Game",
"thumbnailUrl": "Virtual_Pet_Game.png"

"gameTitle": "path finder puzzle",
"gameUrl": "path_finder",
"thumbnailUrl": "pathfinder.png"
},
"411":{ "gameTitle": "Tiny Fishing",
"gameUrl": "Tiny_Fishing",
"thumbnailUrl": "Tiny_Fishing.png"
},
"398":{
"410":{
"gameTitle": "Shrek Vs Wild",
"gameUrl": "Shrek_Vs_Wild",
"thumbnailUrl": "Shrek_Vs_Wild.png"
},
"409":{
"gameTitle": "Hover_Board_Effect",
"gameUrl": "Hover_Board_Effect",
"thumbnailUrl": "Hover_Board_Effect.png"
},
"405":{
"gameTitle": "Candy_Crush_Saga",
"gameUrl": "Candy_Crush_Saga",
"thumbnailUrl": "Candy_Crush_Saga.png"
},"419":{

"gameTitle": "16_Puzzle",
"gameUrl": "16_Puzzle",
"thumbnailUrl": "16_Puzzle.png"
},
"420":{
"gameTitle" : "Colour_Generator_Game",
"gameUrl": "Colour_Generator_Game",
"thumbnailUrl": "Colour_Generator_Game.png"
},
"406":{
"gameTitle": "Knife_hit",
"gameUrl": "Knife_hit",
"thumbnailUrl": "Knife_hit.png"
},"415":{
"gameTitle": "Anagram_Checker_Game",
"gameUrl": "Anagram_Checker_Game",
"thumbnailUrl": "Anagram_Checker_Game.png"

},
"407":{
"gameTitle": "Screen_Pet_Game",
"gameUrl": "Screen_Pet_Game",
"thumbnailUrl": "Screen_Pet_Game.png"

},"416":{
"gameTitle": "Guess_The_Song",
"gameUrl": "Guess_The_Song",
"thumbnailUrl": "Guess_The_Song.png"
"398": {
"gameTitle": "path finder puzzle",
"gameUrl": "path_finder",
"thumbnailUrl": "pathfinder.png"
},
"399": {
"gameTitle": "NameFate",
"gameUrl": "namefate",
"thumbnailUrl": "namefate.png"
},
"400": {
"gameTitle": "Menja block breaker",
"gameUrl": "Menja_block_breaker",
"thumbnailUrl": "menja_Block_breaker.png"
},
"401": {
"gameTitle": "Pop My Balloon",
"gameUrl": "Pop_My_Balloon",
"thumbnailUrl": "Pop_My_Balloon.png"
},
"402": {
"gameTitle": "Tower Stack",
"gameUrl": "Tower_Stack",
"thumbnailUrl": "Tower_Stack.png"
},
"403": {
"gameTitle": "Virtual Pet Game",
"gameUrl": "Virtual_Pet_Game",
"thumbnailUrl": "Virtual_Pet_Game.png"
},
"404": {
"gameTitle": "Tiny Fishing",
"gameUrl": "Tiny_Fishing",
"thumbnailUrl": "Tiny_Fishing.png"
},
"405": {
"gameTitle": "Shrek Vs Wild",
"gameUrl": "Shrek_Vs_Wild",
"thumbnailUrl": "Shrek_Vs_Wild.png"
},
"406": {
"gameTitle": "Hover_Board_Effect",
"gameUrl": "Hover_Board_Effect",
"thumbnailUrl": "Hover_Board_Effect.png"
},
"407": {
"gameTitle": "Candy_Crush_Saga",
"gameUrl": "Candy_Crush_Saga",
"thumbnailUrl": "Candy_Crush_Saga.png"
},
"408": {
"gameTitle": "16_Puzzle",
"gameUrl": "16_Puzzle",
"thumbnailUrl": "16_Puzzle.png"
},
"409": {
"gameTitle": "Colour_Generator_Game",
"gameUrl": "Colour_Generator_Game",
"thumbnailUrl": "Colour_Generator_Game.png"
},
"410": {
"gameTitle": "Knife_hit",
"gameUrl": "Knife_hit",
"thumbnailUrl": "Knife_hit.png"
},
"411": {
"gameTitle": "Anagram_Checker_Game",
"gameUrl": "Anagram_Checker_Game",
"thumbnailUrl": "Anagram_Checker_Game.png"
},
"412": {
"gameTitle": "Screen_Pet_Game",
"gameUrl": "Screen_Pet_Game",
"thumbnailUrl": "Screen_Pet_Game.png"
},
"413": {
"gameTitle": "Guess_The_Song",
"gameUrl": "Guess_The_Song",
"thumbnailUrl": "Guess_The_Song.png"
},
"414": {
"gameTitle": "Brick Buster",
"gameUrl": "Brick Buster",
"thumbnailUrl": "Brick.png"
},
"415": {
"gameTitle": "Soccer",
"gameUrl": "Soccer",
"thumbnailUrl": "Soccer"
},
"416": {
"gameTitle": "Pen_Pointer_Fight",
"gameUrl": "PenPointerFight",
"thumbnailUrl": "PenPointerFight.png"
},
"417": {
"gameTitle": "MathQuiz",
"gameUrl": "MathQuiz",
"thumbnailUrl": "MathQuiz.png"
}
},"408":{
"gameTitle": "Brick Buster",
"gameUrl": "Brick Buster",
"thumbnailUrl": "Brick.png"
},
"417":{
"gameTitle": "Ball in Maze",
"gameUrl": "Ball_in_Maze",
"thumbnailUrl": "Ball_in_Maze.png"
},
"409":{
"gameTitle": "Soccer",
"gameUrl": "Soccer",
"thumbnailUrl": "Soccer"
},
"409":{"gameTitle": "Pen_Pointer_Fight",
"gameUrl": "PenPointerFight",
"thumbnailUrl": "PenPointerFight.png"
},
"418":{
"gameTitle": "MathQuiz",
"gameUrl": "MathQuiz",
"thumbnailUrl": "MathQuiz.png"
}

}
9 changes: 5 additions & 4 deletions assets/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -22,7 +22,9 @@ const generateLiTags = (gamesData, searchText = "") => {
</figure>
<div class="title-container">
<a href="https://github.com/kunjgit/GameZone/tree/main/Games/${gameUrl}" target="_blank" aria-label="${gameTitle}">${tagNumber}. ${gameTitle} 🔗</a>
<button class="like-button ${liked ? 'liked' : ''}" onclick="like(this, ${tagNumber})">♡</button>
<button class="like-button ${
liked ? "liked" : ""
}" onclick="like(this, ${tagNumber})">♡</button>
</div>
</a>
</li>
Expand Down Expand Up @@ -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));
}

Loading

0 comments on commit 472c939

Please sign in to comment.