perf(launcher): reduce background resource usage

Make the custom cursor event-driven, pause CSS, theme video, and Lottie work
while the launcher is hidden or unfocused, and reduce presence polling while
osu is running.
This commit is contained in:
HorizonCode committed 2026-11-04 17:00:16 +01:00
1 parent 687ab26752
commit c2fd265b49
8 files changed
+171 -31

No files matched your search

+1 -1
View File
@@ -133,7 +133,7 @@ export const urlIsValidImage = async (url: string) => {
const request = await fetch(url);
if (!request.ok) return false;
const contentType = request.headers.get('content-type');
return contentType?.startsWith('image/');
return contentType?.startsWith('image/') === true;
} catch {
return false;
}