From 8a30266406562a1b465889e67f3a37b43175081c Mon Sep 17 00:00:00 2001 From: Md Saban Date: Thu, 30 May 2024 17:44:22 +0530 Subject: [PATCH] fix: dim files bug --- src/pages/content/index.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pages/content/index.tsx b/src/pages/content/index.tsx index 80f29bd..6774322 100644 --- a/src/pages/content/index.tsx +++ b/src/pages/content/index.tsx @@ -51,9 +51,10 @@ const initExtension = () => { } var observer = new MutationObserver(function (mutations) { - mutations.forEach(function (mutation) { + mutations.forEach(async function (mutation) { if (mutation.type === 'attributes' && mutation.attributeName === 'data-file-user-viewed') { - toggleDimFiles(getStorage('dimFiles')) + const dimFiles = await getStorage('dimFiles') + toggleDimFiles(dimFiles) if (document.querySelector('#customLines')?.checked) addCustomLineChange() } }) @@ -249,7 +250,7 @@ const App = () => { -
+