Skip to content

Commit 379d8c7

Browse files
fix(ui): Unsafe game page detection
1 parent b2e074b commit 379d8c7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/kitten-scientists/source/UserScript.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,10 @@ export class UserScript {
338338
}
339339

340340
private static _isGameLoaded(): boolean {
341-
return !isNil(UserScript.window.game);
341+
return (
342+
!isNil(UserScript.window.game) &&
343+
!Object.prototype.toString.apply(UserScript.window.game).includes("HTMLDivElement")
344+
);
342345
}
343346

344347
static get window(): Window {

0 commit comments

Comments
 (0)