设置标题为自己的昵称
This commit is contained in:
parent
0ba3bf34f8
commit
c9a63d686b
@ -249,12 +249,17 @@
|
|||||||
}
|
}
|
||||||
document.body.appendChild(nameInput)
|
document.body.appendChild(nameInput)
|
||||||
|
|
||||||
|
// 设置标签为自己的头像
|
||||||
if (localStorage.getItem('avatar')) {
|
if (localStorage.getItem('avatar')) {
|
||||||
const favicon = document.createElement('link')
|
const favicon = document.createElement('link')
|
||||||
favicon.rel = 'icon'
|
favicon.rel = 'icon'
|
||||||
favicon.href = localStorage.getItem('avatar')
|
favicon.href = localStorage.getItem('avatar')
|
||||||
document.head.appendChild(favicon)
|
document.head.appendChild(favicon)
|
||||||
}
|
}
|
||||||
|
// 设置标题为自己的昵称
|
||||||
|
if (localStorage.getItem('username')) {
|
||||||
|
document.title = localStorage.getItem('username')
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user