-
Notifications
You must be signed in to change notification settings - Fork 1
/
redirect.html
145 lines (135 loc) · 5.21 KB
/
redirect.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Agar Clone</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="google-adsense-account" content="ca-pub-8832461201977627">
<meta
name="description"
content="Agar Clone is a multiplayer action game where players try to eat other players and grow their own cells. Play for free now!"
/>
<meta
name="keywords"
content="Agar Clone, agar clone, agar.io clone, agar clone vn, agar clone id, thecolors, thecolors agar, agar color, AGAR, agar, action, game, cells, free"
/>
<link rel="icon" href="TemplateData/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="TemplateData/style.css" />
<link rel="stylesheet" href="TemplateData/loading.css" />
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.0.0/crypto-js.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/1.6.0/axios.min.js"></script>
<!-- <script id="Cookiebot" src="https://consent.cookiebot.com/uc.js" data-cbid="714f660c-d0b8-4079-a195-8a0d4fe69a79" data-blockingmode="auto" type="text/javascript"></script> -->
<script
type="text/javascript"
src="https://cdn.applixir.com/applixir.sdk3.0m.js"
></script>
<style>
#applixir_vanishing_div {
position: fixed;
top: 0;
left: 0;
z-index: 9999;
}
</style>
</head>
<body>
<script type="text/javascript">
function adStatusCallback(status) {
instance.SendMessage("User", "Set_Notification_ads", status);
}
</script>
<div id="applixir_vanishing_div" hidden>
<iframe id="applixir_parent" allow="autoplay"></iframe>
</div>
<div id="unity-container" class="unity-desktop">
<canvas id="unity-canvas" style="display: none;"></canvas>
<div id="unity-warning"></div>
<div id="unity-footer"></div>
</div>
<div id="loading">
<div class="tetrominos">
<div class="tetromino box1"></div>
<div class="tetromino box2"></div>
<div class="tetromino box3"></div>
<div class="tetromino box4"></div>
</div>
</div>
<script>
var container = document.querySelector("#unity-container");
var canvas = document.querySelector("#unity-canvas");
var warningBanner = document.querySelector("#unity-warning");
var loading = document.querySelector("#loading");
function unityShowBanner(msg, type) {
function updateBannerVisibility() {
warningBanner.style.display = warningBanner.children.length
? "block"
: "none";
}
var div = document.createElement("div");
div.innerHTML = msg;
warningBanner.appendChild(div);
if (type == "error") div.style = "background: red; padding: 10px;";
else {
if (type == "warning")
div.style = "background: yellow; padding: 10px;";
setTimeout(function () {
warningBanner.removeChild(div);
updateBannerVisibility();
}, 5000);
}
updateBannerVisibility();
}
var buildUrl = "Build";
var loaderUrl = buildUrl + "/Agar-Clone.loader.js";
var config = {
dataUrl: buildUrl + "/Agar-Clone.data.br",
frameworkUrl: buildUrl + "/Agar-Clone.framework.js.br",
codeUrl: buildUrl + "/Agar-Clone.wasm.br",
streamingAssetsUrl: "StreamingAssets",
companyName: "TheColors",
productName: "IO",
productVersion: "1.0",
showBanner: unityShowBanner,
};
var script = document.createElement("script");
script.src = loaderUrl;
script.onload = () => {
window.addEventListener("message", function (event) {
var receivedMessage = event.data;
if (event.origin === "https://agar.id.vn") {
var code = decodeURIComponent(
receivedMessage.split(" ")[1]
);
instance.SendMessage("GameManager", "Set_" + receivedMessage.split(" ")[0], code);
} else if (event.origin.includes("xsolla.com")) {
if (JSON.parse(receivedMessage).command == "order-status") {
instance.SendMessage(
"GameManager",
"Set_money",
JSON.parse(receivedMessage).data.user_id +
" " +
JSON.parse(receivedMessage).data.items[0].sku
);
}
}
});
document.body.style.overflow = "hidden";
canvas.style.width = document.documentElement.clientWidth + "px";
canvas.style.height = document.documentElement.clientHeight + "px";
createUnityInstance(canvas, config, (progress) => {})
.then((unityInstance) => {
loading.style.display = "none";
canvas.style.display = "block";
instance = unityInstance;
})
.catch((message) => {
alert(message);
});
};
document.body.appendChild(script);
</script>
</script>
</body>
</html>