mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-30 21:07:04 +02:00
fix sleeve memory bug
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user