Estoy tratando de establecer runOurCode en verdadero y luego en falso cada 5 segundos. Probé setInterval, setTimout, forLoop y todavía no funcionó. Le pregunté a algunos amigos, pero todos están desconectados rn: /
var editingCode; let runOurCode = false const oldFrame = requestAnimationFrame; WebSocket.prototype.send = new Proxy(WebSocket.prototype.send, { apply: function(target, scope, args) { if (typeof(args[0]) === 'string') { let json = JSON.parse(args[0]); if (json[0] === 3) { editingCode = (json[1]) } } let data = target.apply(scope, args); return data; } }) WebSocket.prototype.send = new Proxy(WebSocket.prototype.send, { apply: function(target, scope, args) { if (typeof(args[0]) === 'string') { let json = JSON.parse(args[0]); if (runOurCode) { target.apply(scope, [`[5,77]`]) // u dont need function here (MY BAD) runOurCode = false // set back to false so it doesnt keep drinking } } let run = false document.addEventListener("keypress", e => { if (e.code === "KeyC") { runOurCode = true } }) let data = target.apply(scope, args); return data; } })