Skip to content

Commit

Permalink
fix formatting and linting
Browse files Browse the repository at this point in the history
  • Loading branch information
SkwalExe committed May 21, 2024
1 parent e853f68 commit 69ca2e0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
import Memz from './memz'
export default Memz

16 changes: 9 additions & 7 deletions src/memz.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import WinMB from '@skwalexe/winmb'
import { MessageBoxes, cursors } from './data'
import { getRandomInt, playSound, random } from './utils'
import {MessageBoxes, cursors} from './data'
import {getRandomInt, playSound, random} from './utils'

const soundCount = 6
const winmbAssetsUrl = 'https://cdn.jsdelivr.net/gh/SkwalExe/[email protected]/src/assets/'
Expand Down Expand Up @@ -65,7 +65,7 @@ export default class Memz {
const type = random(['warning', 'error', 'info'])
const message = random(MessageBoxes)

this.w.show('MEMZ', message, type, [{ text: 'OK', value: true }], 'random')
this.w.show('MEMZ', message, type, [{text: 'OK', value: true}], 'random')
}
}, 1000)
}
Expand All @@ -85,9 +85,12 @@ export default class Memz {
if (getRandomInt(0, 15) === 0) {
document.documentElement.style.transform = 'rotate(180deg)'

setTimeout(() => {
document.documentElement.style.transform = 'rotate(0deg)'
}, getRandomInt(200, 3000))
setTimeout(
() => {
document.documentElement.style.transform = 'rotate(0deg)'
},
getRandomInt(200, 3000)
)
}
}, 200)
}
Expand All @@ -100,4 +103,3 @@ export default class Memz {
this.computerSounds()
}
}

2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ export const playSound = (path: string) => {
audio.play()
}

export const random = (list: any[]) => list[Math.floor(Math.random() * list.length)]
export const random = (list: unknown[]) => list[Math.floor(Math.random() * list.length)]

0 comments on commit 69ca2e0

Please sign in to comment.