infamous-test 1.0.4 → 1.0.7

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.
Files changed (3) hide show
  1. package/Dockerfile +19 -8
  2. package/index.html +35 -9
  3. package/package.json +1 -1
package/Dockerfile CHANGED
@@ -1,15 +1,26 @@
1
1
  FROM nginx:alpine
2
2
 
3
- # Remove default nginx website
4
- RUN rm -rf /usr/share/nginx/html/*
5
-
6
- # Copy your site files
3
+ # Copy site files
7
4
  COPY . /usr/share/nginx/html
8
5
 
9
- # Cloud Run uses port 8080
10
- EXPOSE 8080
6
+ # Add MIME types for .mjs files
7
+ RUN echo "types { application/javascript mjs; }" > /etc/nginx/conf.d/mjs-mime.conf
11
8
 
12
- # Update nginx to listen on 8080
13
- RUN sed -i 's/80/8080/g' /etc/nginx/conf.d/default.conf
9
+ # Create nginx config with proper settings
10
+ RUN echo 'server { \
11
+ listen 8080; \
12
+ server_name _; \
13
+ root /usr/share/nginx/html; \
14
+ index index.html; \
15
+ \
16
+ location / { \
17
+ try_files $uri $uri/ /index.html; \
18
+ } \
19
+ \
20
+ location ~* \.(js|mjs|cjs)$ { \
21
+ add_header Content-Type application/javascript; \
22
+ } \
23
+ }' > /etc/nginx/conf.d/default.conf
14
24
 
25
+ EXPOSE 8080
15
26
  CMD ["nginx", "-g", "daemon off;"]
package/index.html CHANGED
@@ -399,7 +399,7 @@ button.button:hover { background: var(--bg-3); }
399
399
  <p>A state of the art unblocked games website. Clean, customizable, and powerful.</p>
400
400
  </div>
401
401
  </div>
402
- <p class="version-tag">infamous <a href="#" target="_blank">unpkg v1.0.4</a></p>
402
+ <p class="version-tag">infamous <a href="#" target="_blank">unpkg v1.0.7</a></p>
403
403
  </div>
404
404
  </div>
405
405
 
@@ -445,16 +445,36 @@ button.button:hover { background: var(--bg-3); }
445
445
  </div>
446
446
 
447
447
  <button id="reset-theme" onclick="resetTheme()">CLICK HERE TO RESET YOUR THEME!</button>
448
- <infamousattr version="s1.0.4-unpkg"></infamousattr>
448
+ <infamousattr version="s1.0.5-unpkg"></infamousattr>
449
449
 
450
450
  <!-- Three.js and Vanta -->
451
451
  <script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r134/three.min.js"></script>
452
452
  <script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.fog.min.js"></script>
453
453
 
454
- <!-- UV Bundle and Config -->
455
- <script src="uv/uv.bundle.js"></script>
456
- <script src="uv/uv.config.js"></script>
457
- <script src="baremux/index.js"></script>
454
+ <!-- UV Bundle and Config - Uses INFAMOUS_BASE for path detection -->
455
+ <script>
456
+ // Dynamically load scripts with correct base path
457
+ const base = window.INFAMOUS_BASE || '/';
458
+ document.write('<script src="' + base + 'uv/uv.bundle.js"><\/script>');
459
+ document.write('<script src="' + base + 'baremux/index.js"><\/script>');
460
+ </script>
461
+ <script>
462
+ // Set UV config after bundle loads
463
+ (function() {
464
+ const base = window.INFAMOUS_BASE || '/';
465
+ self.__uv$config = {
466
+ prefix: base + "uv/service/",
467
+ encodeUrl: Ultraviolet.codec.xor.encode,
468
+ decodeUrl: Ultraviolet.codec.xor.decode,
469
+ handler: base + "uv/uv.handler.js",
470
+ client: base + "uv/uv.client.js",
471
+ bundle: base + "uv/uv.bundle.js",
472
+ config: base + "uv/uv.config.js",
473
+ sw: base + "uv/sw.js",
474
+ };
475
+ console.log("[Infamous] UV Config set with base:", base);
476
+ })();
477
+ </script>
458
478
 
459
479
  <!-- Embedded JavaScript -->
460
480
  <script>
@@ -747,12 +767,18 @@ else if (se === "Google") searchE = "https://google.com/search?q=";
747
767
  else if (se === "Brave") searchE = "https://search.brave.com/search?q=";
748
768
 
749
769
  let connection;
770
+ // Use local paths with INFAMOUS_BASE for universal compatibility
771
+ const BAREMUX_WORKER = INFAMOUS_BASE + "baremux/worker.js";
772
+ const LIBCURL_TRANSPORT = INFAMOUS_BASE + "libcurl/index.mjs";
773
+
750
774
  (async () => {
751
775
  try {
752
776
  console.log("[Infamous] Initializing BareMux with base:", INFAMOUS_BASE);
753
777
  console.log("[Infamous] Wisp URL:", wispUrl);
754
- connection = new BareMux.BareMuxConnection(INFAMOUS_BASE + "baremux/worker.js");
755
- await connection.setTransport(INFAMOUS_BASE + "libcurl/index.mjs", [{ wisp: wispUrl }]);
778
+ console.log("[Infamous] BareMux worker:", BAREMUX_WORKER);
779
+ console.log("[Infamous] Libcurl transport:", LIBCURL_TRANSPORT);
780
+ connection = new BareMux.BareMuxConnection(BAREMUX_WORKER);
781
+ await connection.setTransport(LIBCURL_TRANSPORT, [{ wisp: wispUrl }]);
756
782
  console.log("[Infamous] BareMux transport set successfully");
757
783
  } catch(e) { console.error("[Infamous] BareMux init error:", e); }
758
784
  })();
@@ -823,7 +849,7 @@ async function go(u) {
823
849
  console.log("[Infamous] Current transport:", transport);
824
850
  if (!transport) {
825
851
  console.log("[Infamous] Setting transport...");
826
- await connection.setTransport(INFAMOUS_BASE + "libcurl/index.mjs", [{ wisp: wispUrl }]);
852
+ await connection.setTransport(LIBCURL_TRANSPORT, [{ wisp: wispUrl }]);
827
853
  }
828
854
  } else {
829
855
  console.error("[Infamous] No connection object!");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "infamous-test",
3
- "version": "1.0.4",
3
+ "version": "1.0.7",
4
4
  "description": "Infamous - A state of the art unblocked games website",
5
5
  "main": "index.html",
6
6
  "files": [