Fix Settings button keep being added/removed from header

This commit is contained in:
redphx
2024-08-14 08:51:23 +07:00
parent d929a958ff
commit 382cd1aa51
4 changed files with 20 additions and 11 deletions

View File

@@ -146,5 +146,10 @@ export function escapeHtml(html: string): string {
return $span.innerHTML;
}
export function isElementVisible($elm: HTMLElement): boolean {
const rect = $elm.getBoundingClientRect();
return !!rect.width && !!rect.height;
}
export const CTN = document.createTextNode.bind(document);
window.BX_CE = createElement;