4sp-dv 1.1.4 → 1.1.6

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.
@@ -6,7 +6,7 @@
6
6
  <title>4SP - VERSION 5 CLIENT</title>
7
7
  <link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/npm/4sp-dv@latest/images/logo.png">
8
8
 
9
- <base href="https://cdn.jsdelivr.net/npm/4sp-dv@1.1.4/logged-in/">
9
+ <base href="https://cdn.jsdelivr.net/npm/4sp-dv@1.1.6/logged-in/">
10
10
  <script src="https://cdn.tailwindcss.com"></script>
11
11
  <link href="https://fonts.googleapis.com/css2?family=Geist:wght@100..900&display=swap" rel="stylesheet">
12
12
 
@@ -851,7 +851,7 @@
851
851
  const displayUsername = document.getElementById('display-username');
852
852
  const displayEmail = document.getElementById('display-email');
853
853
 
854
- const BASE_URL = 'https://cdn.jsdelivr.net/npm/4sp-dv@1.1.4/logged-in/';
854
+ const BASE_URL = 'https://cdn.jsdelivr.net/npm/4sp-dv@1.1.6/logged-in/';
855
855
 
856
856
  // Preload Logos
857
857
  const preloadImgs = [
@@ -972,13 +972,18 @@
972
972
  // Prevent showing raw directory listing if it resolves to a folder
973
973
  zoneFrame.onload = () => {
974
974
  try {
975
- // Check if title indicates directory listing (heuristic)
976
- const title = zoneFrame.contentDocument ? zoneFrame.contentDocument.title : "";
977
- if (title.includes("Index of") || title.includes("Directory listing")) {
978
- throw new Error("Directory listing detected");
975
+ const doc = zoneFrame.contentDocument;
976
+ const title = doc.title;
977
+ // UPDATED CHECK: Detects 'CDN files' specifically (as seen in screenshot) and generic directory listings
978
+ if (title.includes("CDN files") || title.includes("Index of") || title.includes("Directory listing") || (doc.body && doc.body.textContent.includes("4sp-dv CDN files"))) {
979
+ console.warn("Directory listing detected. Aborting.");
980
+ closeZoneViewer();
981
+ // Refresh the page to clear any weird state
982
+ setTimeout(() => window.location.reload(), 100);
983
+ return;
979
984
  }
980
985
  } catch (e) {
981
- // Cross-origin might block access, assume OK if we can't check
986
+ // Cross-origin might block access. If it's a cross-origin game that loads fine, this error is expected and ignored.
982
987
  }
983
988
  };
984
989
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "4sp-dv",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "homepage": "https://github.com/v5-4simpleproblems/v5-4simpleproblems-dv#readme",