mirror of
https://github.com/bs-community/blessing-skin-plugins.git
synced 2025-01-08 11:37:27 +08:00
[hello-dolly] wrap code in a block
This commit is contained in:
parent
392d7855c1
commit
f2aa09ad7c
@ -1,4 +1,5 @@
|
||||
const lyrics = `Hello, Dolly
|
||||
{
|
||||
const lyrics = `Hello, Dolly
|
||||
Well, hello, Dolly
|
||||
It's so nice to have you back where you belong
|
||||
You're lookin' swell, Dolly
|
||||
@ -27,20 +28,19 @@ Dolly'll never go away
|
||||
Dolly'll never go away
|
||||
Dolly'll never go away again`.split('\n')
|
||||
|
||||
const length = lyrics.length
|
||||
const length = lyrics.length
|
||||
|
||||
const hitokoto = document.createElement('div')
|
||||
hitokoto.style.marginTop = '3px'
|
||||
hitokoto.textContent = lyrics[Math.floor(Math.random() * length)]
|
||||
const hitokoto = document.createElement('div')
|
||||
hitokoto.style.marginTop = '3px'
|
||||
hitokoto.textContent = lyrics[Math.floor(Math.random() * length)]
|
||||
|
||||
const container = document.querySelector('.breadcrumb')
|
||||
if (container) {
|
||||
container.appendChild(hitokoto)
|
||||
} else {
|
||||
const container = document.createElement('div')
|
||||
container.className = 'breadcrumb'
|
||||
container.appendChild(hitokoto)
|
||||
document.querySelector('.content-header')?.appendChild(container)
|
||||
const container = document.querySelector('.breadcrumb')
|
||||
if (container) {
|
||||
container.appendChild(hitokoto)
|
||||
} else {
|
||||
const container = document.createElement('div')
|
||||
container.className = 'breadcrumb'
|
||||
container.appendChild(hitokoto)
|
||||
document.querySelector('.content-header')?.appendChild(container)
|
||||
}
|
||||
}
|
||||
|
||||
export default undefined
|
||||
|
Loading…
Reference in New Issue
Block a user