forked from sent/waves
78 lines
3.7 KiB
HTML
78 lines
3.7 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<script>
|
|
if (window.parent !== window.self) window.parent.postMessage("bonk", "*");
|
|
window.addEventListener("DOMContentLoaded", function () {
|
|
document.body.style.margin = "0";
|
|
document.body.style.height = "100vh";
|
|
document.body.style.overflow = "hidden";
|
|
});
|
|
</script>
|
|
<html lang="en-us">
|
|
<head>
|
|
<script type="application/javascript" src="/js/main.js"></script>
|
|
<meta charset="utf-8" />
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
|
|
<title>SnowBattle.io</title>
|
|
<link href="shared/style.css" rel="stylesheet" />
|
|
<link rel="stylesheet" href="TemplateData56/style.css" />
|
|
<script src="TemplateData56/UnityProgress.js"></script>
|
|
<link rel="shortcut icon" href="TemplateData/favicon.ico" />
|
|
<script src="Build/UnityLoader.js"></script>
|
|
<script type="text/javascript" src="/controls.js"></script>
|
|
<script>
|
|
window.rWS = WebSocket;
|
|
WebSocket = function (url, options) {
|
|
var split = url.split("://");
|
|
var prefix = "";
|
|
switch (split[0].toLowerCase()) {
|
|
case "ws":
|
|
prefix = "wss://onebigorange-tmm.tbt.mx/websocket/http://";
|
|
break;
|
|
case "wss":
|
|
prefix = "wss://onebigorange-tmm.tbt.mx/websocket/https://";
|
|
break;
|
|
default:
|
|
prefix = split[0];
|
|
}
|
|
return new (Function.prototype.bind.call(
|
|
window.rWS,
|
|
null,
|
|
(split[1].match(/\//g) || []).length === 0 ? (split[1].includes("?") ? prefix + split[1].replace("?", "/?") : prefix + split[1] + "/") : prefix + split[1],
|
|
options
|
|
))();
|
|
};
|
|
var origOpen = XMLHttpRequest.prototype.open;
|
|
XMLHttpRequest.prototype.open = function (...args) {
|
|
args[1] = /^http/.test(args[1]) ? "https://onebigstatic-tmm.tbt.mx/static/" + args[1] : args[1];
|
|
origOpen.apply(this, args);
|
|
};
|
|
window.origBlob = window.Blob;
|
|
window.Blob = function (array, options) {
|
|
if (array[1] instanceof Uint8Array) {
|
|
array[1] = new TextDecoder("utf-8").decode(array[1]).replace(/window\.top\.location\.href|window\.location\.href|document\.referrer|document\.URL/g, '"https://storage.y8.com/"');
|
|
}
|
|
return new window.origBlob(array, options);
|
|
};
|
|
var gameInstance = UnityLoader.instantiate("gameContainer", "Build/Snowbattle_io-new.json", {
|
|
onProgress: UnityProgress,
|
|
Module: {
|
|
onRuntimeInitialized: function () {
|
|
UnityProgress(gameInstance, "complete");
|
|
},
|
|
},
|
|
});
|
|
</script>
|
|
<script src="shared/lib.js" type="text/javascript"></script>
|
|
<script type="application/javascript" src="/js/lib.js"></script>
|
|
<script src="./js/all.js"></script>
|
|
<script src="shared/gamebreak/gamebreak.js" type="text/javascript"></script>
|
|
</head>
|
|
<body>
|
|
<div class="webgl-content">
|
|
<div id="gameContainer" style="width: 100vw; height: 100vh;"></div>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
</html>
|