From f668aa7acd032681bfd48d32bd456cc56c7dc381 Mon Sep 17 00:00:00 2001 From: Gabe Yuan Date: Mon, 18 Mar 2024 17:55:32 +0800 Subject: [PATCH] fix: hide transbox --- src/common.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/common.js b/src/common.js index 84da4d0..1d97566 100644 --- a/src/common.js +++ b/src/common.js @@ -107,7 +107,9 @@ async function showFab(translator) { const fab = await getFabWithDefault(); const $action = document.createElement("div"); $action.setAttribute("id", APP_LCNAME); - $action.style.fontSize = '0px'; + $action.style.fontSize = "0"; + $action.style.width = "0"; + $action.style.height = "0"; document.body.parentElement.appendChild($action); const shadowContainer = $action.attachShadow({ mode: "closed" }); const emotionRoot = document.createElement("style"); @@ -144,7 +146,9 @@ function showTransbox({ const $tranbox = document.createElement("div"); $tranbox.setAttribute("id", "kiss-transbox"); - $tranbox.style.fontSize = "0px"; + $tranbox.style.fontSize = "0"; + $tranbox.style.width = "0"; + $tranbox.style.height = "0"; document.body.parentElement.appendChild($tranbox); const shadowContainer = $tranbox.attachShadow({ mode: "closed" }); const emotionRoot = document.createElement("style");