var noSleep = new NoSleep();

function enableNoSleep() {
	noSleep.enable();
	document.removeEventListener('touchstart', enableNoSleep, false);
	console.log('nosleep started');
}

/* Enable wake lock.
  (must be wrapped in a user input event handler e.g. a mouse or touch handler) */
	document.addEventListener('touchstart', enableNoSleep, false);
	
// Disable wake lock at some point in the future.
// (does not need to be wrapped in any user input event handler)
//noSleep.disable();