MCPcopy Create free account
hub / github.com/ImGoodBai/MapGoGoGo / onVisibility

Function onVisibility

frontend/src/App.tsx:755–759  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

753
754 useEffect(() => {
755 const onVisibility = () => {
756 if (document.hidden && tracking) {
757 setMessage("你刚才离开了挑战页,期间不会记录。回到页面后继续。");
758 }
759 };
760 document.addEventListener("visibilitychange", onVisibility);
761 return () => document.removeEventListener("visibilitychange", onVisibility);
762 }, [tracking]);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected