@arcade-v/arcade_v 2.3.8 → 2.4.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.
- package/navigation/games/apps.json +27 -0
- package/navigation/games/games.html +3 -0
- package/navigation/games/games.js +143 -48
- package/navigation/games/games.json +683 -177
- package/navigation/home.js +63 -3
- package/navigation/style.css +32 -10
- package/package.json +2 -2
|
@@ -71,6 +71,15 @@
|
|
|
71
71
|
],
|
|
72
72
|
"mode": "A"
|
|
73
73
|
},
|
|
74
|
+
{
|
|
75
|
+
"title": "Scratch Editor",
|
|
76
|
+
"image": "https://cdn.jsdelivr.net/gh/arcade-v/images/apps/scratch_editor.png",
|
|
77
|
+
"url": "https://cdn.jsdelivr.net/gh/arcade-v/apps/scratch_editor/index.html",
|
|
78
|
+
"category": [
|
|
79
|
+
"App"
|
|
80
|
+
],
|
|
81
|
+
"mode": "A"
|
|
82
|
+
},
|
|
74
83
|
{
|
|
75
84
|
"title": "Scratch Loader GX",
|
|
76
85
|
"image": "https://cdn.jsdelivr.net/gh/arcade-v/images/apps/scratchloadergx.svg",
|
|
@@ -98,6 +107,15 @@
|
|
|
98
107
|
],
|
|
99
108
|
"mode": "A"
|
|
100
109
|
},
|
|
110
|
+
{
|
|
111
|
+
"title": "Video Player",
|
|
112
|
+
"image": "https://cdn.jsdelivr.net/gh/arcade-v/images/apps/video_player.png",
|
|
113
|
+
"url": "https://cdn.jsdelivr.net/gh/arcade-v/apps/video_player.html",
|
|
114
|
+
"category": [
|
|
115
|
+
"App"
|
|
116
|
+
],
|
|
117
|
+
"mode": "A"
|
|
118
|
+
},
|
|
101
119
|
{
|
|
102
120
|
"title": "Wayground",
|
|
103
121
|
"image": "https://cdn.jsdelivr.net/gh/arcade-v/images/apps/wayground.png",
|
|
@@ -115,5 +133,14 @@
|
|
|
115
133
|
"App"
|
|
116
134
|
],
|
|
117
135
|
"mode": "A"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"title": "Zip Extractor",
|
|
139
|
+
"image": "https://cdn.jsdelivr.net/gh/arcade-v/images/apps/zip_extractor.png",
|
|
140
|
+
"url": "https://cdn.jsdelivr.net/gh/arcade-v/apps/zip_extractor.html",
|
|
141
|
+
"category": [
|
|
142
|
+
"App"
|
|
143
|
+
],
|
|
144
|
+
"mode": "A"
|
|
118
145
|
}
|
|
119
146
|
]
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
<option value="All">All</option>
|
|
25
25
|
<option value="2D">2D</option>
|
|
26
26
|
<option value="3D">3D</option>
|
|
27
|
+
<option value="Bullet Heaven">Bullet Heaven</option>
|
|
27
28
|
<option value="Bullet Hell">Bullet Hell</option>
|
|
28
29
|
<option value="Fighting">Fighting</option>
|
|
29
30
|
<option value="Flash">Flash</option>
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
<option value="New">New</option>
|
|
36
37
|
<option value="One Button">One Button</option>
|
|
37
38
|
<option value="Platformer">Platformer</option>
|
|
39
|
+
<option value="Point & Clicker">Point & Click</option>
|
|
38
40
|
<option value="Popular">Popular</option>
|
|
39
41
|
<option value="Puzzle">Puzzle</option>
|
|
40
42
|
<option value="Retro">Retro</option>
|
|
@@ -42,6 +44,7 @@
|
|
|
42
44
|
<option value="RPG">RPG</option>
|
|
43
45
|
<option value="Shoot 'Em Up">Shoot 'Em Up</option>
|
|
44
46
|
<option value="Shooter">Shooter</option>
|
|
47
|
+
<option value="Simulation">Simulation</option>
|
|
45
48
|
<option value="Sports">Sports</option>
|
|
46
49
|
<option value="Tower Defence">Tower Defence</option>
|
|
47
50
|
</select>
|
|
@@ -22,57 +22,109 @@ async function fetchGames(_0xea7716) {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
function renderPage() {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
25
|
+
const _0x58edb0 = document.getElementById("gameButtons");
|
|
26
|
+
_0x58edb0.innerHTML = '';
|
|
27
|
+
|
|
28
|
+
const _0x26f5d8 = (currentPage - 1) * 0x30;
|
|
29
|
+
const _0x15088d = _0x26f5d8 + 0x30;
|
|
30
|
+
const _0x496520 = filteredGames.slice(_0x26f5d8, _0x15088d);
|
|
31
|
+
|
|
32
|
+
if (_0x496520.length === 0) {
|
|
33
|
+
currentPage = 1;
|
|
34
|
+
|
|
35
|
+
const _0x39c312 = filteredGames.slice(0, 0x30);
|
|
36
|
+
|
|
37
|
+
if (_0x39c312.length === 0) {
|
|
38
|
+
_0x58edb0.innerHTML = "<p>No games found.</p>";
|
|
39
|
+
document.getElementById("paginationControls").innerHTML = '';
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
_0x39c312.forEach(_0x136e3b => {
|
|
44
|
+
const _0x1a868b = document.createElement("div");
|
|
45
|
+
_0x1a868b.className = "game-button";
|
|
46
|
+
|
|
47
|
+
const _0x5cda8f = favorites.includes(_0x136e3b.title);
|
|
48
|
+
const _0x4f0cc4 = _0x5cda8f ? '⭐' : '☆';
|
|
49
|
+
|
|
50
|
+
let _0x2bd3f3 = '';
|
|
51
|
+
|
|
52
|
+
if (_0x136e3b.action === "random") {
|
|
53
|
+
_0x2bd3f3 = "playRandomGame()";
|
|
54
|
+
} else if (Array.isArray(_0x136e3b.functions)) {
|
|
55
|
+
_0x2bd3f3 = _0x136e3b.functions.map(_0x43001c => {
|
|
56
|
+
const _0x1ecd7f = _0x43001c.params
|
|
57
|
+
.map(_0x495430 => "'" + _0x495430 + "'")
|
|
58
|
+
.join(',');
|
|
59
|
+
|
|
60
|
+
return _0x43001c.name + '(' + _0x1ecd7f + ')';
|
|
61
|
+
}).join(';');
|
|
62
|
+
} else {
|
|
63
|
+
_0x2bd3f3 = "handleGameClick('" + _0x136e3b.url + "', '" + _0x136e3b.mode + "')";
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
_0x1a868b.innerHTML = `
|
|
67
|
+
<button onclick="${_0x2bd3f3}" aria-label="${_0x136e3b.title}">
|
|
68
|
+
<img src="${_0x136e3b.image}" alt="${_0x136e3b.title}" loading="lazy">
|
|
69
|
+
</button>
|
|
70
|
+
<p class="game-title">
|
|
71
|
+
<span class="game-name">${_0x136e3b.title}</span>
|
|
72
|
+
<span class="favorite-icon" onclick="toggleFavorite('${_0x136e3b.title}')">${_0x4f0cc4}</span>
|
|
73
|
+
</p>
|
|
74
|
+
`;
|
|
75
|
+
|
|
76
|
+
_0x58edb0.appendChild(_0x1a868b);
|
|
77
|
+
|
|
78
|
+
requestAnimationFrame(() => {
|
|
79
|
+
fitGameTitle(_0x1a868b.querySelector(".game-name"));
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
renderPaginationControls();
|
|
84
|
+
return;
|
|
37
85
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
86
|
+
|
|
87
|
+
_0x496520.forEach(_0x29b9ba => {
|
|
88
|
+
const _0x1770c5 = document.createElement("div");
|
|
89
|
+
_0x1770c5.className = 'game-button';
|
|
90
|
+
|
|
91
|
+
const _0x4f0799 = favorites.includes(_0x29b9ba.title);
|
|
92
|
+
const _0x3e3784 = _0x4f0799 ? '⭐' : '☆';
|
|
93
|
+
|
|
94
|
+
let _0x5682b6 = '';
|
|
95
|
+
|
|
96
|
+
if (_0x29b9ba.action === "random") {
|
|
97
|
+
_0x5682b6 = "playRandomGame()";
|
|
98
|
+
} else if (Array.isArray(_0x29b9ba.functions)) {
|
|
99
|
+
_0x5682b6 = _0x29b9ba.functions.map(_0x278710 => {
|
|
100
|
+
const _0x34dff7 = _0x278710.params
|
|
101
|
+
.map(_0x24d89a => "'" + _0x24d89a + "'")
|
|
102
|
+
.join(',');
|
|
103
|
+
|
|
104
|
+
return _0x278710.name + '(' + _0x34dff7 + ')';
|
|
105
|
+
}).join(';');
|
|
106
|
+
} else {
|
|
107
|
+
_0x5682b6 = "handleGameClick('" + _0x29b9ba.url + "', '" + _0x29b9ba.mode + "')";
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
_0x1770c5.innerHTML = `
|
|
111
|
+
<button onclick="${_0x5682b6}" aria-label="${_0x29b9ba.title}">
|
|
112
|
+
<img src="${_0x29b9ba.image}" alt="${_0x29b9ba.title}" loading="lazy">
|
|
113
|
+
</button>
|
|
114
|
+
<p class="game-title">
|
|
115
|
+
<span class="game-name">${_0x29b9ba.title}</span>
|
|
116
|
+
<span class="favorite-icon" onclick="toggleFavorite('${_0x29b9ba.title}')">${_0x3e3784}</span>
|
|
117
|
+
</p>
|
|
118
|
+
`;
|
|
119
|
+
|
|
120
|
+
_0x58edb0.appendChild(_0x1770c5);
|
|
121
|
+
|
|
122
|
+
requestAnimationFrame(() => {
|
|
123
|
+
fitGameTitle(_0x1770c5.querySelector(".game-name"));
|
|
124
|
+
});
|
|
54
125
|
});
|
|
126
|
+
|
|
55
127
|
renderPaginationControls();
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
_0x496520.forEach(_0x29b9ba => {
|
|
59
|
-
const _0x1770c5 = document.createElement("div");
|
|
60
|
-
_0x1770c5.className = 'game-button';
|
|
61
|
-
const _0x4f0799 = favorites.includes(_0x29b9ba.title);
|
|
62
|
-
const _0x3e3784 = _0x4f0799 ? '⭐' : '☆';
|
|
63
|
-
let _0x5682b6 = '';
|
|
64
|
-
if (Array.isArray(_0x29b9ba.functions)) {
|
|
65
|
-
_0x5682b6 = _0x29b9ba.functions.map(_0x278710 => {
|
|
66
|
-
const _0x34dff7 = _0x278710.params.map(_0x24d89a => "'" + _0x24d89a + "'").join(',');
|
|
67
|
-
return _0x278710.name + '(' + _0x34dff7 + ')';
|
|
68
|
-
}).join(';');
|
|
69
|
-
} else {
|
|
70
|
-
_0x5682b6 = "handleGameClick('" + _0x29b9ba.url + "', '" + _0x29b9ba.mode + "')";
|
|
71
|
-
}
|
|
72
|
-
_0x1770c5.innerHTML = "\n <button onclick=\"" + _0x5682b6 + "\" aria-label=\"" + _0x29b9ba.title + "\">\n <img src=\"" + _0x29b9ba.image + "\" alt=\"" + _0x29b9ba.title + "\" loading=\"lazy\">\n </button>\n <p class=\"game-title\">\n " + _0x29b9ba.title + "\n <span class=\"favorite-icon\" onclick=\"toggleFavorite('" + _0x29b9ba.title + "')\">" + _0x3e3784 + "</span>\n </p>\n ";
|
|
73
|
-
_0x58edb0.appendChild(_0x1770c5);
|
|
74
|
-
});
|
|
75
|
-
renderPaginationControls();
|
|
76
128
|
}
|
|
77
129
|
function applyFilters() {
|
|
78
130
|
const _0x3b91e7 = document.getElementById("searchBar").value.toLowerCase();
|
|
@@ -117,6 +169,30 @@ function toggleFavorite(_0x2df159) {
|
|
|
117
169
|
localStorage.setItem("favorites", JSON.stringify(favorites));
|
|
118
170
|
renderPage();
|
|
119
171
|
}
|
|
172
|
+
function fitGameTitle(element) {
|
|
173
|
+
const maxLines = 2;
|
|
174
|
+
const minSize = 9;
|
|
175
|
+
const step = 0.5;
|
|
176
|
+
|
|
177
|
+
const isMobile = window.matchMedia("(max-width: 768px)").matches;
|
|
178
|
+
const baseSize = isMobile ? 0.95 * 16 : 1.1 * 16;
|
|
179
|
+
|
|
180
|
+
element.style.fontSize = `${baseSize}px`;
|
|
181
|
+
element.style.lineHeight = "1.3";
|
|
182
|
+
|
|
183
|
+
while (parseFloat(element.style.fontSize) > minSize) {
|
|
184
|
+
const lineHeight = parseFloat(
|
|
185
|
+
getComputedStyle(element).lineHeight
|
|
186
|
+
);
|
|
187
|
+
|
|
188
|
+
if (element.scrollHeight <= lineHeight * maxLines + 1) {
|
|
189
|
+
break;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
element.style.fontSize =
|
|
193
|
+
`${parseFloat(element.style.fontSize) - step}px`;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
120
196
|
function handleGameClick(_0x1071f5, _0x1707ea) {
|
|
121
197
|
console.log(" Opening " + _0x1071f5 + " in mode " + _0x1707ea);
|
|
122
198
|
if (_0x1707ea === 'A') {
|
|
@@ -127,4 +203,23 @@ function handleGameClick(_0x1071f5, _0x1707ea) {
|
|
|
127
203
|
console.warn("Unknown mode, defaulting to Blob");
|
|
128
204
|
loadBlobContent(_0x1071f5);
|
|
129
205
|
}
|
|
206
|
+
}
|
|
207
|
+
function playRandomGame() {
|
|
208
|
+
if (!appsData.length) return;
|
|
209
|
+
|
|
210
|
+
const randomGame = appsData[
|
|
211
|
+
Math.floor(Math.random() * appsData.length)
|
|
212
|
+
];
|
|
213
|
+
|
|
214
|
+
if (randomGame.action === "random") return playRandomGame();
|
|
215
|
+
|
|
216
|
+
if (Array.isArray(randomGame.functions)) {
|
|
217
|
+
randomGame.functions.forEach(fn => {
|
|
218
|
+
if (typeof window[fn.name] === "function") {
|
|
219
|
+
window[fn.name](...fn.params);
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
} else {
|
|
223
|
+
handleGameClick(randomGame.url, randomGame.mode);
|
|
224
|
+
}
|
|
130
225
|
}
|