Skip to content

Commit 785c891

Browse files
Update index.html
1 parent 76fa905 commit 785c891

1 file changed

Lines changed: 95 additions & 89 deletions

File tree

index.html

Lines changed: 95 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
<!DOCTYPE html>
22
<html lang="en-us">
33
<head>
4-
<!-- ===== GitHub-optimized SEO ===== -->
4+
<!-- ===== GitHub-optimized SEO (StaticQuasar931) ===== -->
55
<meta charset="utf-8" />
66
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
77
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
8+
89
<title>GTA Mods – StaticQuasar931 (Unblocked GTA-style Modes)</title>
9-
<meta name="description" content="GTA Mods — GTA-style modes you can play right in your browser. Free, fullscreen canvas, and school-safe on Chromebook, PC, and mobile. Works anywhere." />
10+
<meta name="description" content="Play GTA Mods — GTA-style modes right in your browser. Free, school-safe, Chromebook friendly, and fullscreen canvas. Works at school, work, or anywhere." />
1011
<meta name="robots" content="index, follow, max-image-preview:large" />
11-
<meta name="keywords" content="GTA Mods, GTA mod, GTA game, GTA g@me, GTA unblocked, GTA at school, GTA working at school, school safe games, unbl0cked, static, static 931, staticquasar931, staticq, staticq931, staticquasar 931, gta browser, gta online free, gta like game" />
12-
<link rel="canonical" href="https://staticquasar931.github.io/gta-mods/" />
12+
<meta name="keywords" content="GTA Mods, GTA mod, GTA game, GTA g@me, GTA unblocked, GTA at school, GTA working at school, school safe games, unbl0cked, static, static 931, staticquasar931, staticquasar 931, staticq, staticq931, gta browser, gta online free, gta like game, gta mods unbl0cked, gta g@mes at school" />
13+
<link rel="canonical" href="https://staticquasar931.github.io/GTA-Mods/" />
1314

1415
<!-- Open Graph / Twitter -->
1516
<meta property="og:type" content="website" />
1617
<meta property="og:title" content="GTA Mods – GTA-style Modes (Unblocked)" />
1718
<meta property="og:description" content="Play GTA-style modes free in your browser. School-safe, Chromebook friendly, and fullscreen canvas." />
18-
<meta property="og:url" content="https://staticquasar931.github.io/gta-mods/" />
19+
<meta property="og:url" content="https://staticquasar931.github.io/GTA-Mods/" />
1920
<meta property="og:image" content="https://res.cloudinary.com/dcsrqennd/image/upload/v1747533056/raw_um4pvq.png" />
2021
<meta name="twitter:card" content="summary_large_image" />
2122
<meta name="theme-color" content="#0aa" />
@@ -26,7 +27,7 @@
2627
"@context":"https://schema.org",
2728
"@type":"VideoGame",
2829
"name":"GTA Mods – GTA-style Modes",
29-
"url":"https://staticquasar931.github.io/gta-mods/",
30+
"url":"https://staticquasar931.github.io/GTA-Mods/",
3031
"author":{"@type":"Organization","name":"StaticQuasar931"},
3132
"publisher":{"@type":"Organization","name":"StaticQuasar931"},
3233
"operatingSystem":"Web",
@@ -37,60 +38,66 @@
3738
}
3839
</script>
3940

40-
<!-- Hidden SEO block (200+ words, links use Google Sites per preference) -->
41+
<!-- Hidden SEO block (200+ words, internal links absolute to Google Sites) -->
4142
<div style="position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden">
4243
<h1>Play GTA Mods — GTA-style Modes in Your Browser (Unblocked)</h1>
4344
<p>
4445
Welcome to <strong>GTA Mods</strong>, a GTA-style collection that launches instantly in your browser with no downloads.
4546
This page is tuned for GitHub Pages SEO so students and fans can easily find a <em>school-safe</em> way to try free,
4647
sandbox-style driving and open-world play. It’s designed to work smoothly on Chromebook, Windows, and macOS with a
47-
fullscreen canvas that auto-fits the screen. If you’re browsing at school or work, our layout avoids popups and uses
48-
lightweight assets to keep page performance reliable on limited networks.
48+
fullscreen canvas that auto-fits the screen. If you’re browsing at school or work, our layout avoids disruptive popups
49+
and uses lightweight assets to keep page performance reliable on limited networks.
4950
</p>
5051
<p>
5152
Looking for more school-friendly games? Visit the main list at
5253
<a href="https://sites.google.com/view/staticquasar931/gm3z">StaticQuasar931 Games</a> or send requests through the
5354
<a href="https://sites.google.com/view/staticquasar931/google-form">Google Form</a>. We maintain alternative links and
5455
backups so if one version stalls, you can try another quickly. Keywords include GTA mods unblocked, GTA like game,
55-
working at school, and school-safe browser games. Our goal is to help players enjoy fun, casual experiences during
56-
breaks while keeping everything simple, fullscreen, and accessible on school devices.
56+
working at school, school-safe browser games, and Static 931. Our goal is to help players enjoy fun, casual experiences
57+
during breaks while keeping everything simple, fullscreen, and accessible on school devices.
5758
</p>
5859
<p>
5960
All progress that can be saved from the page layer is stored in <strong>localStorage</strong> on your device,
6061
so returning to this GitHub page remembers settings like menu visibility and cached game state bridges when the
6162
underlying build supports external save calls. Your data never leaves the browser. For support or new mode ideas,
62-
follow our Instagram or use the form linked below.
63+
follow our Instagram or use the form linked below. Brand keywords for indexing: static, staticquasar, staticquasar931,
64+
static 931, staticq, staticq931, gta mods, gta game, gta g@me, unbl0cked gta g@mes, working at school.
6365
</p>
6466
</div>
6567

6668
<!-- Styles -->
6769
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/centerclassroom/mc55@main/style.css">
68-
6970
<style>
70-
html, body { margin:0; padding:0; height:100%; overflow:hidden;
71+
html, body {
72+
margin:0; padding:0; height:100%; overflow:hidden;
7173
-webkit-touch-callout:none; -webkit-user-select:none; user-select:none;
7274
-webkit-tap-highlight-color: rgba(0,0,0,0);
7375
font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
76+
background:#000;
7477
}
7578
canvas:focus { outline: none; }
7679

77-
/* Full-viewport Unity canvas & loading cover */
80+
/* Full-viewport canvas & loading cover */
7881
#unity-container { position:fixed; inset:0; }
7982
#unity-canvas { width:100vw; height:100vh; display:block; cursor: default; }
80-
#loading-cover { position:fixed; inset:0; background: #000 center/cover no-repeat; display:none; }
83+
#loading-cover { position:fixed; inset:0; background:#000 center/cover no-repeat; display:none; }
8184

82-
/* Static Menu (top-left) */
85+
/* Static Menu (top-left, twinkle + close with 3m return) */
8386
#staticMenu{
8487
position: fixed; top: 10px; left: 10px; z-index: 99999;
8588
background:#111; color:#0ff; padding:10px 16px; border-radius:10px; font-size:14px;
86-
animation: glow 2s infinite alternate;
89+
box-shadow:0 0 0 rgba(0,255,255,0.0);
90+
animation: twinkle 3.2s infinite ease-in-out;
8791
transition: opacity .35s ease, transform .35s ease, visibility .35s ease;
8892
}
8993
#staticMenu a{ color:#0ff; text-decoration:none; font-weight:bold; }
9094
#closeStaticMenu{ margin-left:12px; color:#f55; cursor:pointer; }
91-
@keyframes glow{0%{opacity:.7}100%{opacity:1; box-shadow:0 0 10px #0ff}}
95+
@keyframes twinkle{
96+
0%,100%{ box-shadow:0 0 6px rgba(0,255,255,0.35); }
97+
50%{ box-shadow:0 0 14px rgba(0,255,255,0.85); }
98+
}
9299

93-
/* Rotating popup (bottom-right): Google Form ↔ Instagram only */
100+
/* Bottom-right rotating quick link (Google Form ↔ Instagram only) */
94101
#staticSlideMenu{
95102
position: fixed; bottom:24px; right:24px; z-index: 99999;
96103
width:100px; height:100px; display:flex; align-items:center; justify-content:center;
@@ -111,7 +118,7 @@ <h1>Play GTA Mods — GTA-style Modes in Your Browser (Unblocked)</h1>
111118
</style>
112119
</head>
113120
<body class="light">
114-
<!-- Top-left Static Menu -->
121+
<!-- Top-left Static Menu (with close & 3-minute return) -->
115122
<div id="staticMenu" aria-label="Static menu with site link">
116123
<a href="https://sites.google.com/view/staticquasar931/gm3z" target="_blank" rel="noopener"
117124
aria-label="Open more unblocked games by StaticQuasar931 in a new tab">More Unblocked Games by Static</a>
@@ -146,24 +153,29 @@ <h1>Play GTA Mods — GTA-style Modes in Your Browser (Unblocked)</h1>
146153
</noscript>
147154

148155
<script>
149-
// ===== Page-level persistence (local memory) =====
156+
// ===== Local memory helpers =====
150157
const LS_PREFIX = "sq931.gta-mods.";
151158
const saveLS = (k,v)=>{ try{ localStorage.setItem(LS_PREFIX+k, JSON.stringify(v)); }catch(e){} };
152159
const loadLS = (k,d=null)=>{ try{ const v=localStorage.getItem(LS_PREFIX+k); return v?JSON.parse(v):d; }catch(e){ return d; } };
153160

154-
// Remember / restore menus-hidden toggle
155-
(function restoreMenusHidden(){
156-
if(loadLS("menusHidden", false)) document.body.classList.add("menus-hidden");
157-
window.addEventListener('keydown', (e)=>{ if(e.key.toLowerCase()==='y') yDown=true; if(e.key.toLowerCase()==='u') uDown=true; if(e.key.toLowerCase()==='i') iDown=true; check(); });
158-
window.addEventListener('keyup', (e)=>{ if(e.key.toLowerCase()==='y') yDown=false; if(e.key.toLowerCase()==='u') uDown=false; if(e.key.toLowerCase()==='i') iDown=false; });
159-
window.addEventListener('blur', ()=>{ yDown=uDown=iDown=false; });
160-
let yDown=false,uDown=false,iDown=false;
161+
// Leave warning (requested)
162+
window.onbeforeunload = function(){
163+
return "Are you sure you want to leave? Progress and settings are saved locally when possible.";
164+
};
165+
166+
// Menus global toggle via Y+U+I (persist)
167+
(function menusHotkey(){
168+
if(loadLS("menusHidden", false)) document.body.classList.add('menus-hidden');
169+
const down = new Set();
161170
function check(){
162-
if(yDown && uDown && iDown){
171+
if (down.has('y') && down.has('u') && down.has('i')){
163172
document.body.classList.toggle('menus-hidden');
164173
saveLS("menusHidden", document.body.classList.contains('menus-hidden'));
165174
}
166175
}
176+
window.addEventListener('keydown', (e)=>{ down.add(e.key.toLowerCase()); check(); });
177+
window.addEventListener('keyup', (e)=>{ down.delete(e.key.toLowerCase()); });
178+
window.addEventListener('blur', ()=> down.clear());
167179
})();
168180

169181
// Static Menu close/return (3 minutes), persisted
@@ -223,18 +235,13 @@ <h1>Play GTA Mods — GTA-style Modes in Your Browser (Unblocked)</h1>
223235
}
224236
})();
225237
})();
226-
227-
// Leave warning (requested)
228-
window.onbeforeunload = function(){
229-
return "Are you sure you want to leave? Progress and settings are saved locally when possible.";
230-
};
231238
</script>
232239

233-
<!-- ===== Unity loader / game boot ===== -->
240+
<!-- ===== Unity loader / game boot (with robust part fallback) ===== -->
234241
<script>
235242
const buildUrl = "https://cdn.jsdelivr.net/gh/centerclassroom/mc55@main/Build";
236243
const loaderUrl = buildUrl + "/bb0d9ecdb05db3e84da20bd14a4f84dc.loader.js";
237-
const config = {
244+
const baseConfig = {
238245
dataUrl: buildUrl + "/cffd2fddc93a5e3bb5ff56ac3bb5a297.data.br",
239246
frameworkUrl: buildUrl + "/c39bf58f300a834e953a20c745c5e5f2.framework.js",
240247
codeUrl: buildUrl + "/d649f30ffe591eef6765ee27d7fc980f.wasm.br",
@@ -251,7 +258,7 @@ <h1>Play GTA Mods — GTA-style Modes in Your Browser (Unblocked)</h1>
251258
const progressBarFull = document.querySelector("#unity-progress-bar-full");
252259
const spinner = document.querySelector('.spinner');
253260

254-
// Responsive canvas helper (keeps pixel-perfect size for Unity)
261+
// Responsive canvas sizing
255262
function resizeCanvas(){
256263
const dpr = Math.min(window.devicePixelRatio || 1, 2);
257264
canvas.width = Math.floor(window.innerWidth * dpr);
@@ -262,13 +269,6 @@ <h1>Play GTA Mods — GTA-style Modes in Your Browser (Unblocked)</h1>
262269
resizeCanvas();
263270
window.addEventListener('resize', resizeCanvas);
264271

265-
const canFullscreen = (function () {
266-
for (const key of ['exitFullscreen','webkitExitFullscreen','webkitCancelFullScreen','mozCancelFullScreen','msExitFullscreen']) {
267-
if (key in document) return true;
268-
}
269-
return false;
270-
}());
271-
272272
if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) {
273273
container.className = "unity-mobile";
274274
}
@@ -281,12 +281,9 @@ <h1>Play GTA Mods — GTA-style Modes in Your Browser (Unblocked)</h1>
281281
window.addEventListener('pointerdown', FocusGame);
282282
window.addEventListener('touchstart', FocusGame);
283283

284-
let StartUnityInstance;
285-
let myGameInstance;
286-
let initGame = false;
287-
let nowFullAdOpen = false;
284+
let myGameInstance, initGame=false, nowFullAdOpen=false;
288285

289-
// ===== Local memory save bridge (for builds that call these) =====
286+
// ===== Local memory save bridge (Unity ↔ page) =====
290287
(function setupLocalSaveBridge(){
291288
const SAVE_KEY = "gameSave.v1";
292289
window.GameSave = {
@@ -304,8 +301,7 @@ <h1>Play GTA Mods — GTA-style Modes in Your Browser (Unblocked)</h1>
304301
},
305302
clear(){ try{ localStorage.removeItem(LS_PREFIX + SAVE_KEY); }catch(e){} }
306303
};
307-
308-
// Compatibility function names used by some templates
304+
// Compatibility names used by common templates
309305
window.SaveCloud = function(data){ return window.GameSave.save(data); };
310306
window.LoadCloud = function(){ return window.GameSave.load(); };
311307
window.InitPlayer = function(){ return Promise.resolve("noAuth"); };
@@ -320,7 +316,13 @@ <h1>Play GTA Mods — GTA-style Modes in Your Browser (Unblocked)</h1>
320316
window.flasgsData = function(){};
321317
})();
322318

323-
// Split file merger (unchanged behavior but safer errors)
319+
// Split file merger with graceful fallback to single files if parts are missing
320+
async function tryHead(url){
321+
try{
322+
const r = await fetch(url, { method: 'HEAD' });
323+
return r.ok;
324+
}catch(e){ return false; }
325+
}
324326
async function mergeFileParts(fileUrl, partCount) {
325327
const parts = [];
326328
for (let i = 0; i < partCount; i++) {
@@ -335,76 +337,80 @@ <h1>Play GTA Mods — GTA-style Modes in Your Browser (Unblocked)</h1>
335337
for (const part of parts) { merged.set(new Uint8Array(part), off); off += part.byteLength; }
336338
return URL.createObjectURL(new Blob([merged], { type: 'application/octet-stream' }));
337339
}
338-
339340
async function prepareUnityConfig(cfg) {
340-
// Restore original split behavior (adjust counts if your host uses different slicing)
341-
const dataPartsCount = 4;
342-
const wasmPartsCount = 4;
343-
cfg.dataUrl = await mergeFileParts(buildUrl + "/cffd2fddc93a5e3bb5ff56ac3bb5a297.data.br", dataPartsCount);
344-
cfg.codeUrl = await mergeFileParts(buildUrl + "/d649f30ffe591eef6765ee27d7fc980f.wasm.br", wasmPartsCount);
341+
const dataBase = buildUrl + "/cffd2fddc93a5e3bb5ff56ac3bb5a297.data.br";
342+
const wasmBase = buildUrl + "/d649f30ffe591eef6765ee27d7fc980f.wasm.br";
343+
const hasDataParts = await tryHead(dataBase + ".part0");
344+
const hasWasmParts = await tryHead(wasmBase + ".part0");
345+
try{
346+
if (hasDataParts) cfg.dataUrl = await mergeFileParts(dataBase, 4);
347+
else cfg.dataUrl = dataBase;
348+
}catch(e){ cfg.dataUrl = dataBase; }
349+
try{
350+
if (hasWasmParts) cfg.codeUrl = await mergeFileParts(wasmBase, 4);
351+
else cfg.codeUrl = wasmBase;
352+
}catch(e){ cfg.codeUrl = wasmBase; }
345353
return cfg;
346354
}
347355

348-
// Load Unity loader once, then boot
356+
// Load Unity loader dynamically, then boot
349357
(function boot(){
350358
const script = document.createElement("script");
351359
script.src = loaderUrl;
352360
script.onload = async () => {
353361
try {
354-
const updatedConfig = await prepareUnityConfig({ ...config });
355-
StartUnityInstance = function () {
356-
createUnityInstance(canvas, updatedConfig, (progress) => {
357-
spinner.style.display = "none";
358-
progressBarEmpty.style.display = "";
359-
progressBarFull.style.width = `${Math.floor(100 * progress)}%`;
360-
}).then((unityInstance) => {
361-
myGameInstance = unityInstance;
362-
loadingCover.style.display = "none";
363-
initGame = true;
364-
// Attempt to pass any existing local save back if the build expects it
365-
try{
366-
const saved = window.GameSave.load();
367-
if (saved && saved !== "noData") {
368-
// If your Unity side listens on a known GameObject/Method, wire it here:
369-
// myGameInstance.SendMessage("BridgeObject", "OnSaveLoaded", saved);
370-
}
371-
}catch(e){}
372-
}).catch((message) => {
373-
console.error("Unity load error:", message);
374-
});
375-
};
376-
StartUnityInstance();
362+
const updatedConfig = await prepareUnityConfig({ ...baseConfig });
363+
createUnityInstance(canvas, updatedConfig, (progress) => {
364+
spinner.style.display = "none";
365+
progressBarEmpty.style.display = "";
366+
progressBarFull.style.width = `${Math.floor(100 * progress)}%`;
367+
}).then((unityInstance) => {
368+
myGameInstance = unityInstance;
369+
loadingCover.style.display = "none";
370+
initGame = true;
371+
372+
// If your Unity side expects a save payload, you can forward it here:
373+
// const saved = window.GameSave.load();
374+
// if (saved && saved !== "noData") {
375+
// myGameInstance.SendMessage("BridgeObject", "OnSaveLoaded", saved);
376+
// }
377+
}).catch((message) => {
378+
console.error("Unity load error:", message);
379+
});
377380
} catch (error) {
378381
console.error("Error starting Unity:", error);
379382
}
380383
};
384+
script.onerror = ()=> console.error("Failed to load Unity loader script.");
381385
document.body.appendChild(script);
382386
})();
383387

384-
// Defensive: ignore unhandled promise rejections in ads/hooks from templates
388+
// Defensive: ignore unhandled promise rejections from ad/template stubs
385389
window.addEventListener("unhandledrejection", function(event) {
386390
console.warn("Suppressed rejection:", event.reason);
387391
event.preventDefault();
388392
});
389393

390-
// Optional ad template shims (kept minimal)
394+
// Optional ad template shims (no-ops unless your build listens)
391395
function FullAdShow() {
392396
try {
393397
if (!nowFullAdOpen) {
394398
nowFullAdOpen = true;
395-
if (initGame) { myGameInstance.SendMessage("YandexGame", "OpenFullAd"); }
399+
if (initGame && myGameInstance) { myGameInstance.SendMessage("YandexGame", "OpenFullAd"); }
396400
setTimeout(() => {
397401
nowFullAdOpen = false;
398-
if (initGame) { myGameInstance.SendMessage("YandexGame", "CloseFullAd", "true"); }
402+
if (initGame && myGameInstance) { myGameInstance.SendMessage("YandexGame", "CloseFullAd", "true"); }
399403
FocusGame();
400404
}, 500);
401405
}
402406
} catch (error) {}
403407
}
404408
function RewardedShow(rewardId) {
405409
try {
406-
myGameInstance.SendMessage("YandexGame", "RewardVideo", rewardId);
407-
setTimeout(()=>{ myGameInstance.SendMessage("YandexGame", "CloseRewardVideo"); FocusGame(); }, 0);
410+
if (myGameInstance) {
411+
myGameInstance.SendMessage("YandexGame", "RewardVideo", rewardId);
412+
setTimeout(()=>{ myGameInstance.SendMessage("YandexGame", "CloseRewardVideo"); FocusGame(); }, 0);
413+
}
408414
} catch (error) {}
409415
}
410416
function InitGame() {

0 commit comments

Comments
 (0)