From ee224bf4f29e310c14751f55e4c7945d8eeb1505 Mon Sep 17 00:00:00 2001 From: fyears <1142836+fyears@users.noreply.github.com> Date: Mon, 1 Apr 2024 00:13:33 +0800 Subject: [PATCH] new delay function to avoid the import problem --- src/misc.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/misc.ts b/src/misc.ts index 0b48995..39121d2 100644 --- a/src/misc.ts +++ b/src/misc.ts @@ -4,7 +4,6 @@ import * as path from "path"; import { base32, base64url } from "rfc4648"; import XRegExp from "xregexp"; import emojiRegex from "emoji-regex"; -import delay from "delay"; declare global { interface Window { @@ -550,7 +549,8 @@ export const changeMobileStatusBar = ( k.className.contains("mobile-navbar") || k.className.contains("mobile-toolbar") ) { - await delay(300); // have to wait, otherwise the height is not correct?? + // have to wait, otherwise the height is not correct?? + await new Promise((resolve) => setTimeout(resolve, 300)); const height = window .getComputedStyle(k as Element) .getPropertyValue("height");