From 7ad446ade8db9c10623b645613d7f9d7c58f8789 Mon Sep 17 00:00:00 2001 From: dragonwocky Date: Mon, 18 Nov 2024 21:05:28 +1100 Subject: [PATCH] fix(topbar): disable always on top in browser --- src/extensions/topbar/client.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/extensions/topbar/client.mjs b/src/extensions/topbar/client.mjs index 575d8cf..f0f57b0 100644 --- a/src/extensions/topbar/client.mjs +++ b/src/extensions/topbar/client.mjs @@ -15,7 +15,7 @@ const pinLabel = "Pin always on top", export default async function (api, db) { const { html, sendMessage } = api, - { addMutationListener, removeMutationListener } = api, + { addMutationListener } = api, displayLabel = ($btn) => { if ($btn.innerHTML === $btn.ariaLabel) return; $btn.style.width = "auto"; @@ -104,6 +104,7 @@ export default async function (api, db) { } }); + if (!["linux", "win32", "darwin"].includes(api.platform)) return; const alwaysOnTopButton = await db.get("alwaysOnTopButton"); if (alwaysOnTopButton === "Disabled") return; const notionTopbar = ".notion-topbar",