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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "donoboy-psc-rw",
3
- "version": "1.0.0",
3
+ "version": "3.0.0",
4
4
  "description": "Using old skills to bring forth a new age of freedom",
5
5
  "keywords": [
6
6
  "Freedom",
package/subdex.html CHANGED
@@ -772,13 +772,38 @@
772
772
  };
773
773
 
774
774
  // Load games from CDN JSON
775
- fetch('https://cdn.jsdelivr.net/gh/donoboy49/HTML-projects@TESTING-BRANCH/importantfiles(Editable)/gamelist.json')
776
- .then(response => response.json())
777
- .then(games => {
778
- console.log('Loaded games from CDN:', games.length);
779
- allGames = games;
780
- initializeCarousel();
781
- startRandomGameRotation();
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);