From bb57f72e64195eaef228297a0511cba0930e2086 Mon Sep 17 00:00:00 2001 From: redphx <96280+redphx@users.noreply.github.com> Date: Tue, 24 Sep 2024 19:31:56 +0700 Subject: [PATCH] Calculate minimum width of controller-friendly elements + if (getPref(PrefKey.UI_CONTROLLER_FRIENDLY)) { + const observer = new MutationObserver(mutationList => { + if (mutationList.length === 0 || mutationList[0].addedNodes.length === 0) { + return; + } + + // Get dialog + const $dialog = mutationList[0].addedNodes[0]; + if (!$dialog || !($dialog instanceof HTMLElement)) { + return; + } + + // Find un-calculated