donoboy-psc-rw 1.0.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
"name": "Mario 64",
|
|
5
5
|
"description": "The original",
|
|
6
6
|
"creator": "Nintendo",
|
|
7
|
-
"category": "Platformer"
|
|
8
|
-
"url": "https://cdn.jsdelivr.net/gh/donoboy49/HTML-projects@TESTING-BRANCH/importantfiles(Editable)/games/0.html",
|
|
9
|
-
"image": "https://cdn.jsdelivr.net/gh/donoboy49/HTML-projects@TESTING-BRANCH/importantfiles(Editable)/Thumbnails/0.png"
|
|
7
|
+
"category": "Platformer"
|
|
10
8
|
},
|
|
11
9
|
{
|
|
12
10
|
"id": 1,
|
package/package.json
CHANGED
package/subdex.html
CHANGED
|
@@ -772,13 +772,38 @@
|
|
|
772
772
|
};
|
|
773
773
|
|
|
774
774
|
// Load games from CDN JSON
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
775
|
+
const CDN = "https://unpkg.com/YOUR-PACKAGE@VERSION/importantfiles(Editable)/";
|
|
776
|
+
|
|
777
|
+
fetch(CDN + "gamelist.json")
|
|
778
|
+
.then(response => response.json())
|
|
779
|
+
.then(games => {
|
|
780
|
+
|
|
781
|
+
games.forEach(game => {
|
|
782
|
+
game.url = CDN + "games/" + game.id + ".html";
|
|
783
|
+
game.image = CDN + "Thumbnails/" + game.id + ".png";
|
|
784
|
+
});
|
|
785
|
+
|
|
786
|
+
allGames = games;
|
|
787
|
+
|
|
788
|
+
initializeCarousel();
|
|
789
|
+
startRandomGameRotation();
|
|
790
|
+
|
|
791
|
+
const search = new URLSearchParams(window.location.search);
|
|
792
|
+
const id = search.get("id");
|
|
793
|
+
|
|
794
|
+
if (id) {
|
|
795
|
+
const game = allGames.find(
|
|
796
|
+
game => String(game.id) === String(id)
|
|
797
|
+
);
|
|
798
|
+
|
|
799
|
+
if (game) {
|
|
800
|
+
openGame(game.id);
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
})
|
|
804
|
+
.catch(error => {
|
|
805
|
+
console.error("Error loading games from CDN:", error);
|
|
806
|
+
});
|
|
782
807
|
|
|
783
808
|
// Handle direct game loading via URL parameters (like gn-math)
|
|
784
809
|
const search = new URLSearchParams(window.location.search);
|