fix sleeve memory bug

This commit is contained in:
Olivier Gagnon
2021-09-08 23:47:34 -04:00
parent bada8a5f39
commit 2a13db39c7
360 changed files with 5424 additions and 15764 deletions
+2 -5
View File
@@ -5,16 +5,13 @@ import { Exploit } from "./Exploit";
function clickTheUnclickable(event: MouseEvent): void {
if (!event.target || !(event.target instanceof Element)) return;
const display = window.getComputedStyle(event.target as Element).display;
if (display === "none" && event.isTrusted)
Player.giveExploit(Exploit.Unclickable);
if (display === "none" && event.isTrusted) Player.giveExploit(Exploit.Unclickable);
}
function targetElement(): void {
const elem = document.getElementById("unclickable");
if (elem == null) {
console.error(
"Could not find the unclickable elem for the related exploit.",
);
console.error("Could not find the unclickable elem for the related exploit.");
return;
}
elem.addEventListener("click", clickTheUnclickable);