From 042c04b3505992e360b634b9bf85777e761dc494 Mon Sep 17 00:00:00 2001 From: Condorra Date: Fri, 17 Feb 2023 02:57:36 +1100 Subject: [PATCH] Fix erasure of over18 --- src/index.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index b2a374f..d77f423 100644 --- a/src/index.ts +++ b/src/index.ts @@ -55,7 +55,11 @@ function connectTerm() { }); } -function over18() { +declare global { + interface Window { over18: () => void; } +} + +window.over18 = () => { document.getElementById("overlay_over18").style.display = 'none'; isScreened = true; window.localStorage['over18'] = true; @@ -71,5 +75,5 @@ if (params["source"] && params["source"] === "android") { } if (isScreened || window.localStorage['over18']) { - over18(); + window.over18(); }