Improvements

This commit is contained in:
Lncvrt committed 2026-05-31 10:12:16 -07:00
1 parent f0ab704940
commit 1f8edb0b6f
3 files changed
+30 -24

No files matched your search

+10 -8
View File
@@ -50,7 +50,7 @@ export default function BerryDashChatroom () {
const [input, setInput] = useState<string>('')
useEffect(() => {
document.title = 'Lncvrt Games - Chatroom'
document.title = 'Lncvrt Games - Berry Dash Chatroom'
const token = params.get('accountToken') ?? getCookie('accountToken', '-1')
if (token !== '-1') {
@@ -113,15 +113,17 @@ export default function BerryDashChatroom () {
}, [params])
useEffect(() => {
const handleKeyDown = (e: KeyboardEvent) => {
if (e.key === 'Escape') {
backButtonRef.current?.click()
if (!params.get('launcher')) {
const handleKeyDown = (e: KeyboardEvent) => {
if (e.key === 'Escape') {
backButtonRef.current?.click()
}
}
}
window.addEventListener('keydown', handleKeyDown)
return () => window.removeEventListener('keydown', handleKeyDown)
}, [])
window.addEventListener('keydown', handleKeyDown)
return () => window.removeEventListener('keydown', handleKeyDown)
}
}, [params])
useEffect(() => {
if (messagesDiv.current) {
+10 -8
View File
@@ -144,16 +144,18 @@ function BerryDashLeaderboardsSuspence () {
useEffect(() => {
document.title = 'Lncvrt Games - Berry Dash Leaderboards'
const handleKeyDown = (e: KeyboardEvent) => {
if (e.key === 'Escape') {
backButtonRef.current?.click()
backButtonRef2.current?.click()
if (!params.get('launcher')) {
const handleKeyDown = (e: KeyboardEvent) => {
if (e.key === 'Escape') {
backButtonRef.current?.click()
backButtonRef2.current?.click()
}
}
}
window.addEventListener('keydown', handleKeyDown)
return () => window.removeEventListener('keydown', handleKeyDown)
}, [])
window.addEventListener('keydown', handleKeyDown)
return () => window.removeEventListener('keydown', handleKeyDown)
}
}, [params])
useEffect(() => {
if (selected != -1) setTimeout(() => Refresh(), 0)
+10 -8
View File
@@ -49,7 +49,7 @@ export default function GeometryRaysChatroom () {
}
useEffect(() => {
document.title = 'Lncvrt Games - Chatroom'
document.title = 'Lncvrt Games - Geometry Rays Chatroom'
setTimeout(async () => await refresh(), 0)
@@ -63,15 +63,17 @@ export default function GeometryRaysChatroom () {
}, [params])
useEffect(() => {
const handleKeyDown = (e: KeyboardEvent) => {
if (e.key === 'Escape') {
backButtonRef.current?.click()
if (!params.get('launcher')) {
const handleKeyDown = (e: KeyboardEvent) => {
if (e.key === 'Escape') {
backButtonRef.current?.click()
}
}
}
window.addEventListener('keydown', handleKeyDown)
return () => window.removeEventListener('keydown', handleKeyDown)
}, [])
window.addEventListener('keydown', handleKeyDown)
return () => window.removeEventListener('keydown', handleKeyDown)
}
}, [params])
useEffect(() => {
if (messagesDiv.current) {