From fca5315e6bebef1cd80560177c06b164f6b45c4b Mon Sep 17 00:00:00 2001 From: HanYaodong Date: Thu, 18 Jan 2024 01:57:55 +0800 Subject: [PATCH] Fix info popup getting behind other div --- src/content.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/content.ts b/src/content.ts index 1fef9bc9..c707d0d8 100644 --- a/src/content.ts +++ b/src/content.ts @@ -1998,7 +1998,7 @@ function openInfoMenu() { const frame = document.createElement("iframe"); frame.width = "374"; - frame.height = "500"; + frame.height = "650"; frame.style.borderRadius = "6px"; frame.addEventListener("load", async () => { frame.contentWindow.postMessage("", "*"); @@ -2046,15 +2046,15 @@ function openInfoMenu() { const parentNodeOptions = [{ // Bilibili - selector: ".right-container-inner", - hasChildCheck: true + selector: ".up-panel-container", // append inside avatar container to avoid z-index issue + hasChildCheck: true, }]; for (const option of parentNodeOptions) { const allElements = document.querySelectorAll(option.selector) as NodeListOf; const el = option.hasChildCheck ? elemHasChild(allElements) : allElements[0]; if (el) { - if (option.hasChildCheck) el.insertBefore(popup, el.firstChild.nextSibling); + if (option.hasChildCheck) el.appendChild(popup); break; } }