document.addEventListener('visibilitychange', () => {
    if (document.visibilityState === 'visible') {
      requestWakeLock();
    }
  });

  // Request on load
  requestWakeLock();
</script>

</body>
</html>
