From b3a3337c61539a4427131bdd724188aa0260940c Mon Sep 17 00:00:00 2001 From: awesomeYG <993631441@qq.com> Date: Thu, 21 Dec 2023 18:48:54 +0800 Subject: [PATCH 1/3] fix: deffer add script --- next.config.js | 2 +- public/cnzz.js | 5 +---- src/pages/_document.tsx | 2 +- src/utils/tools.ts | 1 - 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/next.config.js b/next.config.js index 0163113..cb41d95 100644 --- a/next.config.js +++ b/next.config.js @@ -15,7 +15,7 @@ const nextConfig = withPlugins([withTM], { source: '/', destination: '/tools', basePath: false, - permanent: false + permanent: true } ] } diff --git a/public/cnzz.js b/public/cnzz.js index 21a91b4..848aa6a 100644 --- a/public/cnzz.js +++ b/public/cnzz.js @@ -15,8 +15,5 @@ if ( var riverTag = document.createElement('script'); riverTag.src = 'https://rivers.chaitin.cn/main-header.js'; document.head.append(riverTag); - - document.addEventListener('DOMContentLoaded', function () { - document.body.style.paddingTop = '64px'; - }); + document.body.style.paddingTop = '64px'; } diff --git a/src/pages/_document.tsx b/src/pages/_document.tsx index 06c3c9b..154eaab 100644 --- a/src/pages/_document.tsx +++ b/src/pages/_document.tsx @@ -20,7 +20,7 @@ export default function MyDocument({ emotionStyleTags }: MyDocumentProps) { return ( -