Skip to content

Commit

Permalink
Merge pull request #8 from chaitin/fix-domain
Browse files Browse the repository at this point in the history
Fix domain
  • Loading branch information
phxa1 authored Dec 21, 2023
2 parents 7a70027 + 01fe5ff commit 37b7d40
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 30 deletions.
2 changes: 1 addition & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const nextConfig = withPlugins([withTM], {
source: '/',
destination: '/tools',
basePath: false,
permanent: false
permanent: true
}
]
}
Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions public/cnzz.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ if (
cnzzTag.src = 'https://s4.cnzz.com/z.js?id=1281132544&async=1';
document.head.append(cnzzTag);

const DOMAIN = location?.hostname?.includes("dev")
? "https://dev.rivers.ctopt.cn"
: "https://rivers.chaitin.cn";
var riverTag = document.createElement('script');
riverTag.src = 'https://rivers.chaitin.cn/main-header.js';
riverTag.src = DOMAIN + '/main-header.js';
document.head.append(riverTag);

document.addEventListener('DOMContentLoaded', function () {
document.body.style.paddingTop = '64px';
});
document.body.style.paddingTop = '64px';
}
22 changes: 0 additions & 22 deletions public/tools/cnzz.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function MyDocument({ emotionStyleTags }: MyDocumentProps) {
return (
<Html lang='zh-cmn-Hans'>
<Head>
<script type='text/javascript' src='/tools/cnzz.js' async />
<script type='text/javascript' src='/tools/cnzz.js' defer/>
{emotionStyleTags}
</Head>
<body style={{ margin: 0 }}>
Expand Down
1 change: 0 additions & 1 deletion src/utils/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export type Tool = {
};

export const routesMenu: Tool[] = [
// { icon: dot_blue, label: '网络', children: [] },
{
label: 'URL 编解码',
tags: [Tags.CODE],
Expand Down

0 comments on commit 37b7d40

Please sign in to comment.