From bd019f19a17c1c799d963ddde611e3f150eb3aca Mon Sep 17 00:00:00 2001 From: anime Date: Sun, 29 Dec 2024 01:16:17 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E7=BC=A9=E5=B0=8FMutationObserver=20obser?= =?UTF-8?q?ve=E8=8C=83=E5=9B=B4):?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/GoogleAdsense.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/GoogleAdsense.js b/components/GoogleAdsense.js index 32547cd9..13ab5d2d 100644 --- a/components/GoogleAdsense.js +++ b/components/GoogleAdsense.js @@ -100,7 +100,11 @@ export const initGoogleAdsense = async ADSENSE_GOOGLE_ID => { } // 启动 MutationObserver - observer.observe(document.body, observerConfig) + observer.observe( + document.querySelector('#article-wrapper #notion-article') || + document.body, + observerConfig + ) }, 100) }) }