From 1beca653b772cf10586c417b2c25df03a67df8a2 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Mon, 17 Jul 2023 00:21:24 +0200 Subject: Handle external logouts --- MatrixRoomUtils.Web/wwwroot/css/app.css | 2 +- MatrixRoomUtils.Web/wwwroot/index.html | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'MatrixRoomUtils.Web/wwwroot') diff --git a/MatrixRoomUtils.Web/wwwroot/css/app.css b/MatrixRoomUtils.Web/wwwroot/css/app.css index b3a8cf3..bcd8f5d 100644 --- a/MatrixRoomUtils.Web/wwwroot/css/app.css +++ b/MatrixRoomUtils.Web/wwwroot/css/app.css @@ -118,4 +118,4 @@ a, .btn-link { pre { font-family: JetBrainsMono, var(--bs-font-monospace); -} \ No newline at end of file +} diff --git a/MatrixRoomUtils.Web/wwwroot/index.html b/MatrixRoomUtils.Web/wwwroot/index.html index 0598c4d..9a85530 100644 --- a/MatrixRoomUtils.Web/wwwroot/index.html +++ b/MatrixRoomUtils.Web/wwwroot/index.html @@ -34,10 +34,21 @@ if (element instanceof HTMLElement) { console.log(element); element.focus(); - } else if (element.__internalId) { + } else if (element.hasOwnProperty("__internalId")) { console.log("Element is not an HTMLElement", element); } } + function getWidth(element) { + console.log("getWidth", element); + if (element == null) return 0; + if (element instanceof HTMLElement) { + return element.offsetWidth + } else if (element.hasOwnProperty("__internalId")) { + console.log("Element is not an HTMLElement", element); + return 0; + } + return 0; + } function getWindowDimensions() { return { width: window.innerWidth, -- cgit 1.5.1