From 39571b5ec59077a8734ae8c571e39cd0a0c003c9 Mon Sep 17 00:00:00 2001
From: sowgro <tpoke.ferrari@gmail.com>
Date: Mon, 21 Oct 2024 11:48:11 -0400
Subject: Support firefox

---
 extension/src/main.tsx | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

(limited to 'extension/src/main.tsx')

diff --git a/extension/src/main.tsx b/extension/src/main.tsx
index 45019a5..d988d72 100644
--- a/extension/src/main.tsx
+++ b/extension/src/main.tsx
@@ -2,7 +2,12 @@ import { createRoot } from 'react-dom/client'
 import './index.css'
 import Folder from "./Folder.tsx";
 
-chrome.bookmarks.getTree(tree => {
+// @ts-ignore
+if (typeof browser === "undefined") {
+    var browser = chrome;
+}
+
+browser.bookmarks.getTree().then(tree => {
     createRoot(document.getElementById('root')!).render(
         // @ts-ignore
         <Folder data={tree[0].children[0]} />
-- 
cgit v1.2.3

