thiswillgiveyoualotofmalware / 1v1.lol /js /visibilityChangeListener.js
jacobinathanialpeterson's picture
Upload 1035 files
1e40c2a
raw
history blame
275 Bytes
document.addEventListener("visibilitychange", () => {
if (!gameInstance) {
return;
}
var isFocused = document.visibilityState === "visible";
gameInstance.SendMessage("PersistantObjects", "OnApplicationFocusChange", isFocused ? 1 : 0);
}, false);