mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-16 15:09:28 +00:00
修复Global_JS 不被执行的bug
This commit is contained in:
@@ -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 && (
|
||||
<script
|
||||
async
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: GLOBAL_JS
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
|
||||
{CHATBASE_ID && (
|
||||
<>
|
||||
<script
|
||||
|
||||
Reference in New Issue
Block a user