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.
- package/4simpleproblems_v5.html +2 -2
- package/logged-in/games.html +10 -5
- package/package.json +1 -1
package/4simpleproblems_v5.html
CHANGED
|
@@ -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.
|
|
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.
|
|
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 = [
|
package/logged-in/games.html
CHANGED
|
@@ -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
|
-
|
|
976
|
-
const title =
|
|
977
|
-
|
|
978
|
-
|
|
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,
|
|
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 {
|