(async () => {
if (!window.WebAssembly) {
let e = document.createElement("div");
e.textContent = "WebAssembly is not supported on your browser! Please upgrade your browser to the latest version.",
e.style.position = "absolute",
e.style.top = "0",
e.style.width = "100%",
e.style.padding = "20px",
e.style.background = "red",
e.style.color = "white",
e.style.font = "bold 20px sans-serif",
document.body.appendChild(e);
return
}
let e = []
, t = (t, r) => {
e[t] = r
}
, r = null
, a = () => ((null == r || 0 === r.byteLength) && (r = new Uint8Array(f.e.buffer)),
r)
, n = null
, o = () => ((null == n || 0 === n.byteLength) && (n = new Int32Array(f.e.buffer)),
n)
, s = null
, i = () => ((null == s || 0 === s.byteLength) && (s = new Float64Array(f.e.buffer)),
s)
, l = new TextEncoder("utf-8")
, d = new TextDecoder("utf-8", {
ignoreBOM: !0
});
d.decode();
let c = /^[\x00-\x7f]*/
, u = (e, t) => {
if (c.test(t)) {
let r = f.d(t.length, 1)
, n = a();
for (let e = 0; e < t.length; e++)
n[r + e] = t.charCodeAt(e);
o().set([r, t.length], e >> 2)
} else
y(e, l.encode(t))
}
, p = (e, t) => {
null != t && u(e, t)
}
, y = (e, t) => {
let r = f.d(t.length, 1);
a().set(t, r),
o().set([r, t.length], e >> 2)
}
, m = (e, t) => {
let r = f.d(t.length << 3, 8);
i().set(t, r >> 3),
o().set([r, t.length], e >> 2)
}
, h = [[(e, t) => {
open(e = d.decode(a().subarray(e, e + t)), "_blank", "noopener")
}
, t => (t = e[t]).isContextLost(), () => "boolean" == typeof window.crossOriginIsolated, e => {
t(e, (() => {
let e = document.createElement("input");
return e.spellcheck = !1,
e.autocomplete = "off",
e.tabIndex = -1,
e.lastValue = e.value,
document.body.appendChild(e),
e
}
)())
}
, e => {
t(e, document.createElement("canvas"))
}
, t => {
(t = e[t]).lineJoin = "round"
}
, (t, r, n) => {
t = d.decode(a().subarray(t, t + r)),
n = e[n],
fetch(t).then(e => e.json()).then(e => {
n.push(e),
g()
}
)
}
, t => {
(t = e[t]).stroke()
}
, t => {
(t = e[t]).close()
}
, (t, r) => {
(t = e[t]).font = `{r}px Trebuchet MS } , () => !document.createElement("canvas").getContext("webgl", { failIfMajorPerformanceCaveat: !0 }), t => (t = e[t]).shift(), (t, r) => (t = e[t])[r].uptime, t => { e[t >>>= 0] = null } , t => !(t = e[t]), (e, t) => { e = d.decode(a().subarray(e, e + t)); let r = document.createElement("canvas"); try { return r.getContext(e, { failIfMajorPerformanceCaveat: !0 }) ? 3 : r.getContext(e) ? 2 : 1 } catch (e) { } return 0 } , t => { (t = e[t]).focus() } , (e, t, r) => { t = d.decode(a().subarray(t, t + r)), u(e, (() => { let e = "" , r = document.createElement("span"); for (let a of (r.style.visibility = "hidden", r.style.font = "initial", r.style.fontSize = "1920px", document.body.appendChild(r), ["initial", "sans-serif", "serif", "monospace", "cursive", "fantasy"])) for (let n of (r.style.fontFamily = a, t)) r.textContent = n, e +={r.offsetHeight}
bold /.test(r.key) || r.preventDefault();
let a = r.ctrlKey | r.altKey << 1 | r.shiftKey << 2 | r.metaKey << 3;
e.push(2 | r.repeat | a << 2, r.key, r.code),
g()
}
),
window.addEventListener("keyup", r => {
if (!r.isTrusted)
return;
r.ctrlKey || r.altKey || r.metaKey || t() || /^F([56]|\d{2,}){r}px Ubunturgba({r >> 8 & 255},{a})xywh({a}px {o}px){a}px{o}pxscale({s}){r >> 16},{255 & r}){a}px{o}pxbold {o}px Ubunturgba({i >> 8 & 255},{l})#{r >> 16},{255 & r})rgba({r >> 8 & 255},{a}){r.offsetWidth} {r}px Ubuntu{r >> 16},{255 & r},{r}px {n}px {r}px{n}px{s}, {r}rgb({r >> 8 & 255},{r}px{n}px{s}px/{i >> 16},{255 & i},{e}rgb({r >> 8 & 255},{r >> 16},{255 & r},${a})`
}
, t => t = e[t], (t, r, n) => {
t = e[t],
r = d.decode(a().subarray(r, r + n)),
t.lastValue = r
}
, t => t = e[t], (t, r) => {
u(t, r = e[r])
}
, e => {
t(e, null)
}
, (e, t) => (e = a().subarray(e, e + t),
WebAssembly.validate(e)), (t, r, a) => {
t = e[t],
r = e[r],
a = e[a],
t.attachShader(r, a)
}
, () => {
let e = window.ramp = window.ramp || {};
e.que = e.que || [],
e.passiveMode = !0,
window._pwGA4PageviewId = Date.now().toString();
let t = window.dataLayer = window.dataLayer || []
, r = window.gtag = window.gtag || function () {
t.push(arguments)
}
;
r("js", new Date),
r("config", "UA-120544149-1"),
r("event", "ramp_js", {
send_to: "UA-120544149-1",
pageview_id: window._pwGA4PageviewId
})
}
, (t, r) => (t = e[t])[r].hidden, (r, a) => {
a = e[a],
t(r, (() => {
let e = [];
return a.addEventListener("mousedown", t => {
t.isTrusted && (e.push(1, t.clientX, t.clientY, t.button),
g())
}
),
a.addEventListener("mousemove", t => {
t.isTrusted && (e.push(2, t.clientX, t.clientY),
g())
}
),
a.addEventListener("mouseup", t => {
t.isTrusted && (e.push(3, t.clientX, t.clientY, t.button),
g())
}
),
a.addEventListener("wheel", t => {
t.isTrusted && (t.preventDefault(),
e.push(4, t.clientX, t.clientY, t.deltaY * (1 === t.deltaMode ? 40 : 2 === t.deltaMode ? 320 : 1)),
g())
}
),
a.addEventListener("touchstart", t => {
if (t.isTrusted)
for (let r of (t.preventDefault(),
t.changedTouches))
e.push(5, r.clientX, r.clientY, r.identifier),
g()
}
, {
passive: !1
}),
a.addEventListener("touchmove", t => {
if (t.isTrusted)
for (let r of (t.preventDefault(),
t.changedTouches))
e.push(6, r.clientX, r.clientY, r.identifier),
g()
}
, {
passive: !1
}),
a.addEventListener("touchend", t => {
if (t.isTrusted)
for (let r of (t.preventDefault(),
t.changedTouches))
e.push(7, r.clientX, r.clientY, r.identifier),
g()
}
),
a.addEventListener("touchcancel", t => {
if (t.isTrusted)
for (let r of t.changedTouches)
e.push(8, r.clientX, r.clientY, r.identifier),
g()
}
),
e
}
)())
}
, () => {
let e = !1;
window.addEventListener("error", t => {
if (e)
return;
e = !0;
let { message: r, filename: a, lineno: n, colno: o, error: s } = t;
s && (s = s.toString()),
(null != s || 0 != n || 0 != o) && prompt("The game may have crashed, refresh the page to recover from error.\n\nError information:", JSON.stringify({
message: r,
filename: a,
lineno: n,
colno: o,
error: s
}))
}
)
}
, (r, a) => {
t(r, Object.values((a = e[a]).shift().status))
}
, (r, a, n) => {
a = e[a],
n >>>= 0,
t(r, a.getParameter(n))
}
, () => window.arrasAdDone, (t, r, a, n, o) => {
(t = e[t]).rect(r, a, n, o)
}
]]
, b = fetch("./app.wasm")
, f = (await (WebAssembly.instantiateStreaming ? WebAssembly.instantiateStreaming(b, h) : WebAssembly.instantiate(await b.arrayBuffer(), h))).instance.exports
, g = f.c;
f.b()
}
)();
Assistant
It appears you've shared a very lengthy JavaScript script, which seems to handle WebAssembly functionalities, browser compatibility checks, canvas operations, and various other functions. This is possibly part of a web application or game engine.
If you have any questions about specific parts of this code, or need help debugging or modifying it, could you clarify your query? Let me know how I can assist!
User
how do I modify the text box max character length? I tried to do "d + 30" where it was just "d" and it allowed me to change the html length to have plus 30 of original limit. But i still couldn't add more text
Assistant
User
() => !!window.RTCDataChannel, e => {
t(e, ( () => {
let e = []
, t = () => null != document.activeElement && "INPUT" === document.activeElement.tagName;
return window.addEventListener("keydown", r => {
if (!r.isTrusted)
return;
r.ctrlKey || r.altKey || r.metaKey || t() || /^F([56]|\d{2,})/.test(r.key) || r.preventDefault();
let a = r.ctrlKey | r.altKey << 1 | r.shiftKey << 2 | r.metaKey << 3;
e.push(2 | r.repeat | a << 2, r.key, r.code),
g()
}
),
window.addEventListener("keyup", r => {
if (!r.isTrusted)
return;
r.ctrlKey || r.altKey || r.metaKey || t() || /^F([56]|\d{2,})/.test(r.key) || r.preventDefault();
let a = r.ctrlKey | r.altKey << 1 | r.shiftKey << 2 | r.metaKey << 3;
e.push(1 | a << 2, r.key, r.code),
g()
}
),
e
}
)())
}
Assistant
User
can i change something in it to increase the name box limit?
Assistant
r.offsetWidth
; return r.remove(), e.slice(0, -1) } )()) } , () => !!WebAssembly.instantiateStreaming, () => { try { location.reload() } catch (e) { } } , t => { (t = e[t]).fill() } , (t, r) => { t = e[t], r >>>= 0, t.enableVertexAttribArray(r) } , (t, r, a) => { t = e[t], r >>>= 0, a >>>= 0, t.blendFunc(r, a) } , (t, r, a) => { t = e[t], r >>>= 0, t.pixelStorei(r, a) } , t => { (t = e[t]).lineJoin = "round", t.lineCap = "round", t.textAlign = "left", t.textBaseline = "middle" } , t => (t = e[t]).shift() || 0, e => { u(e, document.referrer) } , (t, r) => { (t = e[t]).globalAlpha = r } , (t, r, a, n, o, s, i) => { t = e[t], r >>>= 0, n >>>= 0, o >>>= 0, s >>>= 0, i = e[i], t.texImage2D(r, a, n, o, s, i) } , t => (t = e[t])[0], (t, r) => { (t = e[t]).font =
{r}px Ubuntu`
}
, t => {
(t = e[t]).save()
}
, (e, r, n) => {
r = d.decode(a().subarray(r, r + n)),
t(e, (() => {
let e = new Image;
return e.src = r,
e
}
)())
}
, (r, a) => {
a = e[a],
t(r, new Promise(e => a.toBlob(e)))
}
, (t, r, a, n, o, s, i, l, d) => {
r >>>= 0,
a = e[a],
l >>>= 0,
d >>>= 0,
y(t, (() => {
let e = new Uint8Array(r);
return a.readPixels(n, o, s, i, l, d + 30, e),
e
}
)())
}
, (r, a, n) => {
a = e[a],
n = n > 0,
t(r, a.getContext("webgl", {
antialias: n,
premultipliedAlpha: !0,
failIfMajorPerformanceCaveat: !0
}))
}
, () => !!window.RTCDataChannel, e => {
t(e, (() => {
let e = []
, t = () => null != document.activeElement && "INPUT" === document.activeElement.tagName;
return window.addEventListener("keydown", r => {
if (!r.isTrusted)
return;
r.ctrlKey || r.altKey || r.metaKey || t() || /^F([56]|\d{2,})
/.test(r.key) || r.preventDefault();
let a = r.ctrlKey | r.altKey << 1 | r.shiftKey << 2 | r.metaKey << 3;
e.push(1 | a << 2, r.key, r.code),
g()
}
),
e
}
)())
}
, (t, r) => {
t = e[t],
r = e[r],
t.appendChild(r)
}
, () => crypto.getRandomValues(new Uint32Array(1))[0], () => Date.now(), (t, r) => (t = e[t])[r].online, (t, r, n, o, s) => {
t = e[t],
r >>>= 0,
n = a().subarray(n, n + o),
s >>>= 0,
t.bufferData(r, n, s)
}
, (t, r) => {
t = e[t],
r = e[r],
t.linkProgram(r)
}
, (t, r, a) => {
t = e[t],
r >>>= 0,
a = e[a],
t.bindBuffer(r, a)
}
, t => (t = e[t]).pop(), t => {
t = e[t],
window.removeEventListener("beforeunload", t)
}
, () => window.devicePixelRatio, (t, r) => {
(t = e[t]).font = `
} , (t, r, a) => { (t = e[t]).width = r, t.height = a } , () => parent !== top, (t, r) => { r = e[r], m(t, (() => { r.style.position = "absolute", r.style.display = "inline-block", r.style.width = "auto", r.style.height = "auto", r.style.overflow = "shown", r.style.transformOrigin = "top left", r.style.transform = ""; let e = r.getBoundingClientRect(); return [e.width, e.height] } )()) } , (r, a) => { a = e[a], t(r, (() => { let e = atob(a.toDataURL().split(",")[1]) , t = new Uint8Array(e.length); for (let r = 0; r < e.length; r++) t[r] = e.charCodeAt(r); return t } )()) } , (e, t) => { console.log(e = d.decode(a().subarray(e, e + t))) } , t => { (t = e[t]).clip() } , (t, r, n, o, s) => { t = e[t], r = d.decode(a().subarray(r, r + n)), t.strokeText(r, o, s) } , (t, r, a, n, o) => { t = e[t], r = e[r], t.uniform3f(r, a, n, o) } , (r, a) => { a = e[a], t(r, new Promise(e => { let t = r => { e(r.data), a.videoRecorder.removeEventListener("dataavailable", t) } ; a.videoRecorder.addEventListener("dataavailable", t) } )) } , () => "ontouchstart" in document.body && /android|mobi/i.test(navigator.userAgent), e => { t(e, document.createElement("div")) } , (t, r, a) => { t = e[t], r >>>= 0, t.strokeStyle =
r>>16,
{255 & r},
} , (t, r) => { y(t, r = e[r]) } , (t, r, n, o, s, i, l) => { t = e[t], r = a().subarray(r, r + n), o = d.decode(a().subarray(o, o + s)), i = d.decode(a().subarray(i, i + l)), t(new Blob([r], { type: o }), i) } , (t, r, n, o) => { (t = e[t])(new Blob([r = e[r]], { type: n = d.decode(a().subarray(n, n + o)) })) } , (r, a, n) => { a = e[a], n >>>= 0, t(r, a.createShader(n)) } , (t, r, a, n) => { t = e[t], r = e[r], t.drawImage(r, a, n) } , e => { t(e, e => { (async () => navigator.clipboard.write([new ClipboardItem({ [e.type]: e })]))().catch(e => alert("Failed to copy!")) } ) } , (t, r, a, n, o) => { (t = e[t]).strokeRect(r, a, n, o) } , t => { (t = e[t]).beginPath() } , (t, r) => (t = e[t])[r].mspt, (t, r) => { t = e[t], r >>>= 0, t.activeTexture(r) } , t => ((t = e[t]).videoRecorder || (t.videoRecorder = new MediaRecorder(t.captureStream(30), { mimeType: MediaRecorder.isTypeSupported("video/webm;codecs=vp8") ? "video/webm;codecs=vp8" : "video/webm", videoBitsPerSecond: 2097152, audioBitsPerSecond: 0 })), "inactive" === t.videoRecorder.state) ? (t.videoRecorder.start(), !1) : (t.videoRecorder.stop(), !0), t => { (t = e[t]).lineCap = "butt" } , t => { (t = e[t]).addEventListener("focus", () => t.select()) } , t => { (t = e[t])[1] = !0 } , (t, r, a, n, o) => { (t = e[t]).fillRect(r, a, n, o) } , t => { let r = (t = e[t])[0]; return t[0] = !1, r } , (t, r, a, n, o) => { (t = e[t]).style.clipPath =
rpx
npx
} , t => (t = e[t]).shift().clients, (t, r, a) => { u(t, (r = e[r])[a].host) } , (e, t) => { e = a().subarray(e, e + t); try { return new WebAssembly.Instance(new WebAssembly.Module(e)).exports.b(BigInt(0)) === BigInt(0) } catch (e) { } return !1 } , t => { (t = e[t]).closePath() } , (t, r, n, o) => (t = e[t], r = e[r], n = d.decode(a().subarray(n, n + o)), t.getAttribLocation(r, n)), (r, a) => { t(r, (a = e[a]).createBuffer()) } , t => { (t = e[t]).remove() } , (t, r, a) => { u(t, (r = e[r])[a].name) } , t => { (t = e[t]).style.textAlign = "center" } , t => "string" == typeof (t = e[t]), (t, r) => { t = e[t], r = e[r], t.replaceWith(r) } , (t, r, a, n, o) => { (t = e[t]).viewport(r, a, n, o) } , (t, r, a, n, o) => { t = e[t], r >>>= 0, a >>>= 0, n >>>= 0, o >>>= 0, t.blendFuncSeparate(r, a, n, o) } , () => { let e = document.activeElement; null != e && e.blur() } , (t, r) => { t = e[t], r = e[r], t.useProgram(r) } , (t, r, n) => (t = e[t], r = d.decode(a().subarray(r, r + n)), t.measureText(r).width), (t, r) => { (t = e[t]).lineWidth = r } , (t, r, n, o) => { t = e[t], r = e[r], n = d.decode(a().subarray(n, n + o)), t.then(e => r(e, n)) } , e => { u(e, location.hostname) } , e => { t(e, (() => { let e = []; return fetch("/CHANGELOG.md").then(e => e.text()).catch(() => "").then(t => e.push(t)), e } )()) } , e => { t(e, (e, t) => { let r = URL.createObjectURL(e) , a = document.createElement("a"); a.style.display = "none", a.setAttribute("download", t), a.setAttribute("href", r), document.body.appendChild(a), a.click(), a.remove(), URL.revokeObjectURL(r) } ) } , e => { u(e, (() => { let e = Error.stackTraceLimit; "number" == typeof e && (Error.stackTraceLimit = 1e3); let t = Error().stack; return "number" == typeof e && (Error.stackTraceLimit = e), t || "" } )()) } , (r, n, o, s) => { n = e[n], o = d.decode(a().subarray(o, o + s)), t(r, (() => { try { return n[o] } catch (e) { return n } } )()) } , () => null != document.fullscreenElement, t => { (t = e[t]).id = "canvas", document.body.appendChild(t) } , (e, t) => { e = d.decode(a().subarray(e, e + t)), (async () => navigator.clipboard.writeText(e))().catch(() => prompt("Copy:", e)) } , (t, r) => { t = e[t], r >>>= 0, t.clear(r) } , (t, r, a) => { t = e[t], r >>>= 0, a = e[a], t.bindTexture(r, a) } , (r, a, n, o) => { a = e[a], n = e[n], o >>>= 0, t(r, a.getProgramParameter(n, o)) } , t => { (t = e[t]).style.clipPath = "none" } , t => "number" == typeof (t = e[t]), (t, r) => { t = e[t], r >>>= 0, t.disable(r) } , t => (t = e[t]).complete, (t, r, a, n, o, s) => { t = e[t], r = e[r], t.drawImage(r, a, n, o, s) } , e => { t(e, (() => { let e = []; return Promise.all([document.fonts.load("bold 16px Ubuntu"), document.fonts.load("16px Ubuntu")]).then(() => e.push(!0)), e } )()) } , (t, r, a) => { t = e[t], r = e[r], t.uniform1i(r, a) } , (t, r, a, n) => { t = e[t], r >>>= 0, a >>>= 0, t.texParameteri(r, a, n) } , () => navigator.hardwareConcurrency || -1, (t, r, a, n, o, s) => { (t = e[t]).style.left =
{r}`
} catch (e) {
return ""
}
}
)())
}
, (r, a) => {
a = e[a],
t(r, (() => {
let e = [];
return a.addEventListener("open", () => {
e.push(1),
g()
}
),
a.addEventListener("message", t => {
e.push(2, new Uint8Array(t.data)),
g()
}
),
a.addEventListener("close", t => {
e.push(3, t.wasClean, t.code, t.reason),
g()
}
),
a.addEventListener("error", () => {
e.push(4),
g()
}
),
e
}
)())
}
, t => (t = e[t]).shift() || 0, (t, r) => {
u(t, (r = e[r]).shift())
}
, (e, r, n, o, s) => {
r = d.decode(a().subarray(r, r + n)),
o = d.decode(a().subarray(o, o + s)),
t(e, (() => {
let e = new WebSocket(r, o.split("\n"));
return e.binaryType = "arraybuffer",
e
}
)())
}
, (t, r, n) => {
t = e[t],
r = a().subarray(r, r + n),
1 === t.readyState && t.send(r)
}
, (t, r) => {
t = e[t],
r >>>= 0,
t.strokeStyle = `rgb(
{r >> 8 & 255},
} , t => (t = e[t], document.activeElement === t), (r, n, o, s, i, l) => { n = d.decode(a().subarray(n, n + o)), s = d.decode(a().subarray(s, s + i)), l = e[l], t(r, (() => { try { return [!1, Function(n, s)(l)] } catch (e) { return [!0, e] } } )()) } , (t, r, a, n, o, s, i, l, d, c) => { t = e[t], i >>>= 0, c = c > 0, t.style.position = "absolute", t.style.left =
} catch (e) { return "" } } )()) } , (r, a) => { a = e[a], t(r, (() => { let e = []; return a.addEventListener("open", () => { e.push(1), g() } ), a.addEventListener("message", t => { e.push(2, new Uint8Array(t.data)), g() } ), a.addEventListener("close", t => { e.push(3, t.wasClean, t.code, t.reason), g() } ), a.addEventListener("error", () => { e.push(4), g() } ), e } )()) } , t => (t = e[t]).shift() || 0, (t, r) => { u(t, (r = e[r]).shift()) } , (e, r, n, o, s) => { r = d.decode(a().subarray(r, r + n)), o = d.decode(a().subarray(o, o + s)), t(e, (() => { let e = new WebSocket(r, o.split("\n")); return e.binaryType = "arraybuffer", e } )()) } , (t, r, n) => { t = e[t], r = a().subarray(r, r + n), 1 === t.readyState && t.send(r) } , (t, r) => { t = e[t], r >>>= 0, t.strokeStyle =
r>>16,
{255 & r})`
}
, t => (t = e[t],
document.activeElement === t), (r, n, o, s, i, l) => {
n = d.decode(a().subarray(n, n + o)),
s = d.decode(a().subarray(s, s + i)),
l = e[l],
t(r, (() => {
try {
return [!1, Function(n, s)(l)]
} catch (e) {
return [!0, e]
}
}
)())
}
, (t, r, a, n, o, s, i, l, d, c) => {
t = e[t],
i >>>= 0,
c = c > 0,
t.style.position = "absolute",
t.style.left = `
{l})`, "important"),
t.maxLength = d + 30,
t.readOnly = c
}
, e => {
u(e, (() => {
let e = document.createElement("canvas").getContext("webgl");
if (!e)
return "";
let t = [e.RENDERER, e.VENDOR]
, r = e.getExtension("WEBGL_debug_renderer_info");
return null != r && t.push(r.UNMASKED_RENDERER_WEBGL, r.UNMASKED_VENDOR_WEBGL),
t.map(t => e.getParameter(t)).join("\n")
}
)())
}
, () => window.innerWidth, (r, a) => {
t(r, (a = e[a]).createProgram())
}
, (t, r) => {
t = e[t],
r = e[r],
t.compileShader(r)
}
, (t, r, a, n) => {
t = e[t],
r >>>= 0,
t.drawArrays(r, a, n)
}
, t => (t = e[t]).readyState, t => {
(t = e[t]).restore()
}
, (e, t) => {
e = d.decode(a().subarray(e, e + t));
try {
localStorage.setItem("arras.io", e)
} catch (e) { }
}
, (r, a) => {
t(r, (a = e[a]).createTexture())
}
, (t, r, a, n, o) => {
(t = e[t]).scissor(r, a, n, o)
}
, e => {
t(e, (() => {
let e = [];
try {
navigator.keyboard.getLayoutMap().then(t => {
e.push(Array.from(t).join("\n"))
}
).catch(t => {
e.push("")
}
)
} catch (t) {
e.push("")
}
return e
}
)())
}
, e => {
t(e, [])
}
, (t, r, n) => {
t = e[t],
r = d.decode(a().subarray(r, r + n)),
t.style.cursor = r
}
, e => {
u(e, location.hash)
}
, (t, r, a) => {
(t = e[t]).moveTo(r, a)
}
, t => !!((t = e[t]).captureStream && window.MediaRecorder && MediaRecorder.isTypeSupported("video/webm")), (e, t) => {
e = d.decode(a().subarray(e, e + t)),
location.hash = e
}
, (t, r) => {
r = e[r],
m(t, (() => {
let e = new Int32Array(r);
return r.length = 0,
e
}
)())
}
, e => {
t(e, window)
}
, (t, r, a) => {
u(t, (r = e[r])[a].code)
}
, (e, t, r, n) => {
console.log(e = d.decode(a().subarray(e, e + t)), r = d.decode(a().subarray(r, r + n)))
}
, e => {
u(e, (() => {
let e;
try {
e = localStorage.getItem("arras.io")
} catch (e) { }
return e || ""
}
)())
}
, (t, r, n, o, s) => {
(t = e[t])(new Blob([r = a().subarray(r, r + n)], {
type: o = d.decode(a().subarray(o, o + s))
}))
}
, (e, t) => {
e = d.decode(a().subarray(e, e + t)),
location.hash = `#
} , (t, r) => { u(t, (r = e[r]).value) } , (t, r) => (t = e[t])[r].featured, (t, r, n) => { t = e[t], r = d.decode(a().subarray(r, r + n)), t.value = r } , (t, r) => { t = e[t], r = e[r], t.then(e => r(e)) } , t => (t = e[t]).shift(), (t, r) => { t = e[t], r >>>= 0, t.depthFunc(r) } , t => (t = e[t]).length, (t, r) => { t = e[t], r >>>= 0, t.fillStyle =
r>>16,
{255 & r})`
}
, (t, r, n, o) => {
t = e[t],
r = e[r],
n = d.decode(a().subarray(n, n + o)),
t.shaderSource(r, n)
}
, (t, r, a, n, o) => {
t = e[t],
r >>>= 0,
n >>>= 0,
t.drawElements(r, a, n, o)
}
, (t, r, a, n) => {
t = e[t],
r = e[r],
t.uniform2f(r, a, n)
}
, () => performance.now(), e => {
t(e, e => (e.preventDefault(),
e.returnValue = "",
""))
}
, (t, r) => {
u(t, (r = e[r]).lastValue)
}
, (t, r) => {
t = e[t],
r >>>= 0,
t.enable(r)
}
, t => {
t = e[t],
window.addEventListener("beforeunload", t)
}
, (t, r, a) => {
(t = e[t]).translate(r, a)
}
, t => "boolean" == typeof (t = e[t]), () => new Date(new Date().getFullYear(), 0, 1).getTimezoneOffset(), (r, n, o, s, i) => {
n = e[n],
o = e[o],
s = d.decode(a().subarray(s, s + i)),
t(r, n.getUniformLocation(o, s))
}
, (t, r, a, n, o) => {
(t = e[t]).clearRect(r, a, n, o)
}
, (t, r) => {
u(t, (r = e[r]).protocol)
}
, (t, r, a) => {
(t = e[t]).lineTo(r, a)
}
, () => {
let e = document.createElement("script");
e.defer = !0,
e.src = "https://static.cloudflareinsights.com/beacon.min.js",
e.setAttribute("data-cf-beacon", JSON.stringify({
token: "arras.io" === location.hostname.slice(-8) ? "ff5561cea47c47eaafe62003a2bb80fe" : "arrax.io" === location.hostname.slice(-8) ? "7ce137179299421288a5a93c26f71e2c" : "arras.netlify.app" === location.hostname.slice(-17) ? "73db2851ba12432c968cae9c6b385f3a" : "arras.cx" === location.hostname.slice(-8) ? "a5ebfa0ea9364b2ca5cddf829c28095e" : "1a3464390f784a2a800f401f1bfa6a30"
})),
document.body.appendChild(e)
}
, t => {
(t = e[t]).lineCap = "round"
}
, t => 0 === (t = e[t]).length ? 0 : t[0].status ? 1 : 2, (t, r) => {
p(t, (r = e[r]).pop())
}
, () => {
try {
document.body.requestFullscreen()
} catch (e) { }
}
, () => window.innerHeight, (e, r, n) => {
r = d.decode(a().subarray(r, r + n)),
t(e, (() => {
let e = document.createElement("div");
return e.id = r,
document.body.appendChild(e),
e
}
)())
}
, (r, a) => {
t(r, (a = e[a])[1])
}
, () => !!navigator.gpu, (t, r, a, n, o, s) => {
(t = e[t]).arc(r, a, n, o, s)
}
, t => {
(t = e[t]).lineJoin = "miter"
}
, (t, r) => (t = e[t])[r].clients, (t, r, a, n, o, s, i, l, d, c) => {
t = e[t],
r = e[r],
t.drawImage(r, a, n, o, s, i, l, d, c)
}
, (t, r, n, o, s, i) => {
t = e[t],
r = e[r],
n = d.decode(a().subarray(n, n + o)),
s = d.decode(a().subarray(s, s + i)),
t(new Blob([r], {
type: n
}), s)
}
, e => {
t(e, (() => {
let e = [!1, !1]
, t = () => {
e[0] = !0,
g(),
e[1] || requestAnimationFrame(t)
}
;
return requestAnimationFrame(t),
e
}
)())
}
, (t, r, a, n, o) => {
(t = e[t]).blendColor(r, a, n, o)
}
, (t, r) => {
r = e[r],
m(t, (() => {
let e = r.getBoundingClientRect();
return [e.top, e.right, e.bottom, e.left]
}
)())
}
, () => {
document.addEventListener("contextmenu", e => {
"A" !== e.target.tagName && "INPUT" !== e.target.tagName && e.preventDefault()
}
)
}
, e => {
u(e, navigator.userAgent || "")
}
, () => !!navigator.serviceWorker, (r, a, n) => {
a = e[a],
n = n > 0,
t(r, a.getContext("2d", {
alpha: n
}))
}
, (e, t) => {
fetch("https://analytics-server.arras.cx:2002/data", {
method: "POST",
mode: "cors",
cache: "no-cache",
headers: {
"Content-Type": "application/json"
},
body: e = d.decode(a().subarray(e, e + t))
}).then(e => e.json()).catch(() => { }
)
}
, () => {
let e = () => window.arrasAdDone = !0
, t = document.createElement("script");
t.async = !0,
t.src = "https://cdn.intergient.com/1024850/73985/ramp.js",
t.onload = () => {
ramp.que.push(e),
setTimeout(e, 2e4)
}
,
t.onerror = e,
document.body.appendChild(t)
}
, e => {
t(e, (() => {
let e = [!1, !1]
, t = new MessageChannel;
return t.port1.addEventListener("message", () => {
e[0] = !0,
g(),
e[1] || (document.hidden ? requestAnimationFrame(() => t.port2.postMessage(null)) : t.port2.postMessage(null))
}
),
t.port1.start(),
t.port2.postMessage(null),
e
}
)())
}
, (t, r, a, n, o, s, i) => {
t = e[t],
r >>>= 0,
n >>>= 0,
o = o > 0,
t.vertexAttribPointer(r, a, n, o, s, i)
}
, (t, r) => {
y(t, (r = e[r]).shift())
}
, (t, r, n, o, s) => {
t = e[t],
r = d.decode(a().subarray(r, r + n)),
t.fillText(r, o, s)
}
, (t, r, a) => {
t = e[t],
r >>>= 0,
t.fillStyle = `rgba(
{r >> 8 & 255},
Great observation! The change you made (d + 30) successfully modified the displayed HTML maxlength of the text box. However, the actual enforcement likely happens at a different layer in the code, probably within event listeners or validation logic.
Let’s dive into what's likely happening and how you can address it:
Why it’s not working as expected
The maxlength attribute in the HTML only sets a user interface constraint. It visually limits how much text can be entered, but if the backend or event listener directly validates the input value (checking length of the input text), then this limit might be enforced elsewhere programmatically.
In your code:
The text box seems to be restricted by both the frontend (t.maxLength) and backend logic in t.lastValue or perhaps even in interaction handlers (input/change events).
Changing the maxLength only changes what's displayed in the HTML, but the logic responsible for interpreting the input text may ignore this.
How to Fix It
To fully modify the maximum allowed length, you’ll likely need to track down all layers of enforcement. Here's a guide:
1. Modify the maxLength Attribute - DONE
You've already modified t.maxLength in your code:
javascript
t.maxLength = d + 30;
This updates the maxlength attribute on the HTML element. ✅
2. Check for Server-Side or Programmatic Validation for Text Length
Look for any code or handler that processes the text input, such as:
Listeners for events like input, keydown, or keyup, which may validate or truncate the text dynamically.
javascript
t.lastValue = r;
code
This line appears to be assigning the input value to `lastValue`. If this value has its length constrained somewhere else, it will stop additional text input from being processed.
**What to do:**
- Track where `t.lastValue` is being validated or truncated.
- Look for something like `substring`, `slice`, or a conditional check (`if (t.length < maxLength)`).
- Adjust those checks to use your updated limit (`d + 30`).
---
#### 3. Input Event Validation (Possible Dynamic Enforcement)
Somewhere, an input handler might dynamically enforce the original length, discarding characters that exceed the limit. Look out for:
```javascript
.addEventListener('input', function(e) {
if (e.target.value.length > maxLength) {
e.target.value = e.target.value.slice(0, maxLength);
}
});
Search your code for references to .addEventListener and check if they look for character limits during input or keyup. You’ll need to either:
Update the maxLength used in the logic to match your updated limit.
Remove any truncation logic to let the user enter more text.
4. Backend or Text Submission Logic
If this input data is sent to another process (e.g., WebSocket or XMLHttpRequest), there might be another layer enforcing a maximum size. For example:
javascript
if (e.length > maxInputLength) {
return; // Input is rejected
}
Ensure you find these validations and update them accordingly.
Debugging and Finding the Issue
Use DevTools to Debug Events:
Open DevTools in your browser.
Select the text box element.
Go to the "Event Listeners" tab to inspect which JavaScript events (e.g., keydown, input) are attached to the textbox.
Review their handlers to find where truncation may occur.
Search for Related Code:
Search for .maxLength, .length, t.lastValue, or anything managing the box text length in your codebase.
Look for functions that enforce any input validation or length restrictions and update those values to align with your adjusted limit (d + 30).
Quick Example Fix (If Truncation Happens Dynamically):
Update validation logic like this:
Original code
javascript
if (input.value.length > maxLength) {
input.value = input.value.slice(0, maxLength);
}
Modified code
javascript
if (input.value.length > (maxLength + 30)) { // adjust limit here
input.value = input.value.slice(0, (maxLength + 30));
}
Next Steps
Inspect your input element and related event listeners for hidden restrictions.
Adjust any dynamic or backend validation layers to account for your new limit.
Test your changes thoroughly to ensure the new max length is respected across all relevant parts of the application.
Let me know how it goes or if you want help debugging specific parts!
This part of the code defines a way to listen for keydown and keyup events, storing the resulting data (like key combinations, repetitions, and key codes) into an array e. Let’s break it down step by step, so you can understand what it’s doing and how it works.
Explanation
Key Components:
() => !!window.RTCDataChannel:
This checks if the RTCDataChannel API exists in the browser (part of WebRTC for peer-to-peer communication). If RTCDataChannel exists, it returns true; otherwise, false.
Event Listener Additions (keydown, keyup):
The code adds listeners for the keydown and keyup events on the window object.
The Callback Function for Listeners:
Both event listeners have callback functions that:
This ensures the event didn't originate from fake/unauthorized sources (e.g., scripts).
Prevent default actions for certain cases (r.preventDefault()).
Track specific details about the keypress:
Whether Ctrl, Alt, Shift, or Meta are held.
The specific key (r.key) and code (r.code) pressed.
The t() Function:
t() ensures that the currently-active element is an input field (INPUT) before applying any key event logic. This prevents interference with text entry into input fields.
Key Details Captured (Pushed into the e Array):
For keydown events:
Whether the key is held down (repeated).
Modifier keys (Ctrl, Alt, Shift, Meta).
Key name and code.
For keyup events:
Whether the key was a modifier key.
Key name and code.
Global Function Calls (g()):
g() is executed at the end of both event listeners. While the actual behavior of g() isn’t shown, it seems to be some trigger function, possibly to process or transmit the collected input data.
Return the Array e:
The returned function is storing the collected key data into the array e.
Detailed Code Walkthrough
Here’s a simplified version, with comments explaining what’s happening:
javascript
() => !!window.RTCDataChannel, // Check if WebRTC DataChannels are supported
e => {
// Main initialization
t(e, (
() => {
let e = [] // Array to store key events
let isInputActive = () => {
return document.activeElement !== null && document.activeElement.tagName === "INPUT";
};
// Listen for 'keydown' events
window.addEventListener("keydown", r => {
if (!r.isTrusted) {
return; // Ignore untrusted events
}
// Prevent events if not on an input field or certain keys
if (!r.ctrlKey && !r.altKey && !r.metaKey && !isInputActive() && !/^F([56]|\d{2,})$/.test(r.key)) {
r.preventDefault();
}
// Record details of the key press
let modifierCombo = r.ctrlKey | (r.altKey << 1) | (r.shiftKey << 2) | (r.metaKey << 3);
e.push((2 | r.repeat | (modifierCombo << 2)), r.key, r.code); // Push key details into the array
g(); // Trigger some action (likely processing or sending the data)
});
// Listen for 'keyup' events
window.addEventListener("keyup", r => {
if (!r.isTrusted) {
return; // Ignore untrusted events
}
if (!r.ctrlKey && !r.altKey && !r.metaKey && !isInputActive() && !/^F([56]|\d{2,})$/.test(r.key)) {
r.preventDefault();
}
let modifierCombo = r.ctrlKey | (r.altKey << 1) | (r.shiftKey << 2) | (r.metaKey << 3);
e.push((1 | (modifierCombo << 2)), r.key, r.code); // Push key details into the array
g(); // Trigger an action
});
return e; // Return the array as part of the function
}
)())
}
Key Functionality
Checks for Active Input Field:
The isInputActive function ensures that keyboard interactions don’t interfere with input fields. This is why it skips processing if the currently active element (document.activeElement) is an INPUT element.
Captures Key Combinations:
The system tracks which modifier keys (such as Ctrl, Alt, Shift, Meta) are held down when a key is pressed. Example:
If Ctrl is pressed, its binary representation is recorded (e.g., 1).
If Ctrl + Alt are pressed together, the combination is shifted appropriately into a binary sequence (e.g., 11).
Other Prevented Keys (Special Function Keys):
Function keys (F5, F6, or higher), which are often reserved for browser actions, are excluded via the regular expression /^F([56]|\d{2,})$/.
Pushes Key Data into an Array e:
The e array acts as a buffer to store all key events (both down and up). This is likely processed later by a function (g()).
Triggers Further Processing (g()):
Function g() is invoked after every key event, signaling the need to process or act upon the buffered data in e.
How to Modify or Extend This Code
Change Key Behavior (e.g., for F5, Ctrl, etc.):
Locate the conditional logic preventing or skipping keys:
javascript
/^F([56]|\d{2,})$/.test(r.key)
Modify the regex to expand or restrict which keys’ default actions are disabled.
Log Key Details or Extend Functionality:
Add console logging to inspect the details:
javascript
console.log({
type: r.type, // Event type (keydown/keyup)
key: r.key, // Physical key pressed (e.g., "a", "Enter")
code: r.code, // Physical key code (e.g., "KeyA", "Enter")
repeat: r.repeat // Whether the key is being held down
});
Currently, inputs are excluded (isInputActive). Remove or modify if you want full key tracking regardless of active elements.
Let me know if you have specific changes you want to make and I’ll walk you through them further!
To increase the name box limit (assuming "name box" refers to a text input field or similar), the parts of the code you shared do not directly interact with the text box's length restriction (like maxlength). However, we can deduce where you can adjust this limit and make it work. Below are the steps and solutions tailored for increasing the name box or text input limit using this code.
1. Examine the Text Box in the Code
Typically, a name input box would have a specific setup like:
javascript
t.maxLength = d; // Sets the maxLength on the input element
You mentioned modifying this to t.maxLength = d + 30, which increases the maxlength attribute in the DOM. However, there's likely additional logic limiting the characters input programmatically. Changing the length of the DOM attribute alone won't override event listeners enforcing restrictions dynamically.
2. Modify Where the Input Text is Validated
Find and Inspect Event Listeners
Review the keydown and keyup event listeners. The input value might be dynamically validated or truncated during those events.
This function ensures only INPUT elements (like the name box) are processed. However, the input value may be truncated elsewhere.
Look for additional logic using:
input.value, r.value, or related variables.
Validation logic like .length > maxLength or truncating with .slice() or .substring().
Here’s an example of how such logic might look:
javascript
input.addEventListener("input", function (e) {
if (input.value.length > maxLength) {
input.value = input.value.slice(0, maxLength);
}
});
Enhance keydown and keyup Event Handlers
In your code, those handlers react to keydown and keyup events. To increase the limit, you need to allow more characters to be captured when the event is triggered. For example, extending what is written into the e array.
Example (Extended Name Limit):
javascript
let nameMaxLimit = 50; // Set your new name limit here!
window.addEventListener("keydown", (r) => {
if (isInputActive()) {
let inputField = document.activeElement;
// Check if the current text length exceeds the new limit
if (inputField.value.length >= nameMaxLimit) {
r.preventDefault(); // Block additional input
}
}
// Additional logic for tracking key events, input, or limits
});
By doing this, you override the character input restriction that previously defaulted to the old limit.
3. Find Where the Input Value is Processed (t.lastValue)
In your original code snippet, t.lastValue appears to hold the value entered by the user:
javascript
t.lastValue = r; // Assigns the value
If this field is limited elsewhere using .length or similar logic, you need to update that logic to take your new limit into account. For example:
Old Logic:
javascript
if (t.lastValue.length > maxLength) {
t.lastValue = t.lastValue.slice(0, maxLength);
}
Update Logic for the New Limit:
javascript
let nameBoxMaxLength = 50; // Update with your new length
if (t.lastValue.length > nameBoxMaxLength) {
t.lastValue = t.lastValue.slice(0, nameBoxMaxLength);
}
4. Check the Backend (Optional)
If the input's max length is restricted server-side (e.g., through WebSocket payload truncation), you’ll need to update the server-side validation as well. Look for any logic doing:
Field truncation like:
javascript
const name = inputName.slice(0, maxLength);
Input validation like:
javascript
if (name.length > maxLength) {
throw new Error("Input exceeds max length");
}
These limits must also align with your updated limit.
5. Debugging Tips
To track down where this restriction is happening:
Open DevTools in your browser.
Find and select the text input (or name box) element.
Use the Event Listeners tab:
Look for listeners on keydown, keyup, or input.
Inspect attached logic functions for any length validations.
Use console logging within the event listeners to explore where the character input is being stopped: