{"size": 493, "ext": "js", "max_stars_repo_path": "out/wakelock.js", "max_stars_repo_name": "jyasskin/toddler-sleep-timer", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "out/wakelock.js", "max_issues_repo_name": "jyasskin/toddler-sleep-timer", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "out/wakelock.js", "max_forks_repo_name": "jyasskin/toddler-sleep-timer", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 35.2142857143, "max_line_length": 70, "alphanum_fraction": 0.7139959432}
let wakeLock = null;
export async function requestWakeLock() {
    if ("wakeLock" in navigator) {
        wakeLock = await navigator.wakeLock.request("screen");
    }
}
const handleVisibilityChange = () => {
    if (wakeLock !== null && document.visibilityState === "visible") {
        requestWakeLock();
    }
};
document.addEventListener("visibilitychange", handleVisibilityChange);
document.addEventListener("fullscreenchange", handleVisibilityChange);
//# sourceMappingURL=wakelock.js.map