diff --git a/.env.local b/.env.local
index 6953ecbd..073b8bbb 100644
--- a/.env.local
+++ b/.env.local
@@ -1,5 +1,5 @@
# 环境变量 @see https://www.nextjs.cn/docs/basic-features/environment-variables
-NEXT_PUBLIC_VERSION=4.4.5
+NEXT_PUBLIC_VERSION=4.4.6
# 可在此添加环境变量,去掉最左边的(# )注释即可
diff --git a/components/ExternalPlugins.js b/components/ExternalPlugins.js
index 01622753..b77f960d 100644
--- a/components/ExternalPlugins.js
+++ b/components/ExternalPlugins.js
@@ -152,12 +152,16 @@ const ExternalPlugin = props => {
}
useEffect(() => {
+ // 异步渲染谷歌广告
if (ADSENSE_GOOGLE_ID) {
setTimeout(() => {
- // 异步渲染谷歌广告
initGoogleAdsense()
}, 1000)
}
+
+ // 执行注入脚本
+ // eslint-disable-next-line no-eval
+ eval(GLOBAL_JS)
}, [])
if (DISABLE_PLUGIN) {
@@ -206,16 +210,6 @@ const ExternalPlugin = props => {
>
)}
- {/* 注入JS脚本 */}
- {GLOBAL_JS && (
-
- )}
-
{CHATBASE_ID && (
<>