enhancement(lint): Fix lint errors for lib/jsscripts/changing_title.ts

Co-authored-by: NeonGamerBot-QK <neon@saahild.com>
Signed-off-by: zeon-neon[bot] <136533918+zeon-neon[bot]@users.noreply.github.com>
This commit is contained in:
zeon-neon[bot] 2025-07-14 21:41:46 +00:00 committed by GitHub
parent 9c3821712f
commit f69c4aa8cb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,27 +1,28 @@
let title0: null | string = null
let interId: any = null
const isDev = process.env.NODE_ENV !== 'production'
export function runTitle() {
if (interId) clearInterval(interId)
interId = setInterval(() => {
if (document.title !== 'Come Back :(') {
title0 = document.title
}
window.document.documentElement.className = "duration-500 ease-in-out "
if (document.hasFocus()) {
document.title = title0?.toLowerCase() === "react app" ? "Saahild.com" : (title0 ?? "Saahild.com")
window.document.documentElement.style.filter = ""
} else {
document.title = 'Come Back :('
if (!isDev) window.document.documentElement.style.filter = "blur(30px)"
}
}, 200)
}
export function stopTitle() {
if (!interId) return false;
return clearInterval(interId)
}
// runTitle()
let title0: null | string = null;
let interId: any = null;
const isDev = process.env.NODE_ENV !== "production";
export function runTitle() {
if (interId) clearInterval(interId);
interId = setInterval(() => {
if (document.title !== "Come Back :(") {
title0 = document.title;
}
window.document.documentElement.className = "duration-500 ease-in-out ";
if (document.hasFocus()) {
document.title =
title0?.toLowerCase() === "react app"
? "Saahild.com"
: (title0 ?? "Saahild.com");
window.document.documentElement.style.filter = "";
} else {
document.title = "Come Back :(";
if (!isDev) window.document.documentElement.style.filter = "blur(30px)";
}
}, 200);
}
export function stopTitle() {
if (!interId) return false;
return clearInterval(interId);
}
// runTitle()