mirror of
https://github.com/NeonGamerBot-QK/saahild.com.git
synced 2024-11-21 20:33:40 +00:00
Fix lint errors for src/scripts/oneko_easteregg.ts
This commit is contained in:
parent
574772205f
commit
4aa6179dae
1 changed files with 17 additions and 17 deletions
|
@ -1,26 +1,26 @@
|
|||
import "./easteregg.css"
|
||||
export function startEasterEgg() {
|
||||
const el = document.createElement('div')
|
||||
el.innerHTML = ""
|
||||
el.className = `easter-egg hidden`
|
||||
document.body.append(el)
|
||||
return {
|
||||
import './easteregg.css'
|
||||
export function startEasterEgg () {
|
||||
const el = document.createElement('div')
|
||||
el.innerHTML = ''
|
||||
el.className = `easter-egg hidden`
|
||||
document.body.append(el)
|
||||
return {
|
||||
destroy: () => {
|
||||
el.remove()
|
||||
},
|
||||
toggle: () => el.classList.toggle('hidden')
|
||||
}
|
||||
}
|
||||
}
|
||||
export function listenForEasterEgg() {
|
||||
const oneko2 = startEasterEgg()
|
||||
window.addEventListener('keydown', (k) => {
|
||||
if(k.shiftKey && k.altKey) oneko2.toggle()
|
||||
})
|
||||
window.addEventListener('keyup', (k) => {
|
||||
export function listenForEasterEgg () {
|
||||
const oneko2 = startEasterEgg()
|
||||
window.addEventListener('keydown', (k) => {
|
||||
if (k.shiftKey && k.altKey) oneko2.toggle()
|
||||
})
|
||||
})
|
||||
window.addEventListener('keyup', (k) => {
|
||||
if (k.shiftKey && k.altKey) oneko2.toggle()
|
||||
})
|
||||
}
|
||||
// expose to window
|
||||
// LATER: there is a way to type this im just lazy atm
|
||||
//@ts-ignore
|
||||
// @ts-ignore
|
||||
window.easter_egg = startEasterEgg
|
||||
|
|
Loading…
Reference in a new issue