ним
! function() {
if (null != window.WebSocket) {
var n = function(n) {
try {
var e = localStorage.getItem(n);
return null == e ? null : JSON.parse(e)
} catch (n) {
return null
}
},
e = n("token"),
o = n("gatewayURL");
if (e && o) {
var r = null != window.DiscordNative || null != window.require ? "etf" : "json",
t = o + "/?encoding=" + r + "&v=6";
void 0 !== window.Uint8Array && (t += "&compress=zlib-stream"), console.log("[FAST CONNECT] " + t + ", encoding: " + r + ", version: 6");
var a = new WebSocket(t);
a.binaryType = "arraybuffer";
var i = Date.now(),
s = {
open: !1,
gateway: t,
messages: []
};
a.onopen = function() {
console.log("[FAST CONNECT] connected in " + (Date.now() - i) + "ms"), s.open = !0
}, a.onclose = a.onerror = function() {
window._ws = null
}, a.onmessage = function(n) {
s.messages.push(n)
}, window._ws = {
ws: a,
state: s
}
}
}
}();
. сделай нормальный гист на гитхабе Или на pastebin Это не читательно
Обсуждают сегодня