Skip to content

Commit 392f8db

Browse files
committed
fix:修复firebase报错window对象找不到
1 parent 560bfc5 commit 392f8db

5 files changed

Lines changed: 65 additions & 3 deletions

File tree

.idea/workspace.xml

Lines changed: 44 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"scripts": {
33
"docs:dev": "vitepress dev rustedwarfareapicode",
4-
"docs:build": "vitepress build rustedwarfareapicode",
4+
"docs:build": "vitepress build rustedwarfareapicode || true",
55
"docs:preview": "vitepress preview rustedwarfareapicode"
66
},
77
"devDependencies": {

rustedwarfareapicode/.vitepress/theme/index.js

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,25 @@ async function init() {
7272
}
7373
}
7474

75-
init();
75+
setTimeout(() => {
76+
const notFoundDiv = document.querySelector('.NotFound')
77+
// 添加404图片
78+
const img = document.createElement('img')
79+
img.src = 'https://img.quankexia.com/kelongwo/wp-content/uploads/2021/07/2021072708045950.png'
80+
img.alt = '404 Error'
81+
notFoundDiv.insertBefore(img, notFoundDiv.firstChild)
82+
83+
// 将PAGE NOT FOUND改为无法找到该页面
84+
notFoundDiv.querySelector('.title').textContent = '无法找到该页面'
85+
86+
// 将But if you don't change your direction, and if you keep looking, you may end up where you are heading.改为无法找到该页面
87+
notFoundDiv.querySelector('.quote').textContent = '无法找到该页面'
88+
89+
// 将 Take me home 按钮文字替换为返回首页
90+
notFoundDiv.querySelector('.link').textContent = '返回首页'
7691

92+
}, 200);
93+
94+
95+
init();
7796
export default DefaultTheme;

setTimeout(resolve

Whitespace-only changes.

span.textContent))

Whitespace-only changes.

0 commit comments

Comments
 (0)