mirror of
https://github.com/arfct/itty-bitty.git
synced 2026-03-11 08:54:33 +00:00
Update nosleep
This commit is contained in:
parent
207d0f538e
commit
4afaae8a25
2 changed files with 2 additions and 3 deletions
|
|
@ -31,7 +31,6 @@ class NoSleep {
|
|||
async _keepAwake() {
|
||||
while(this._noSleep) {
|
||||
if (video) video.play()
|
||||
document.body.innerHTML += "<br>Played"
|
||||
await wait(10000)
|
||||
}
|
||||
}
|
||||
|
|
@ -57,8 +56,8 @@ window.addEventListener("click", function enable() {
|
|||
video.append(source)
|
||||
|
||||
// Play it as a result of user interaction
|
||||
console.log("video", video)
|
||||
video.play()
|
||||
document.body.innerHTML = "Activated"
|
||||
activate()
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<link rel="stylesheet" href="/render/recipe.css" inline>
|
||||
<script src="/render/recipe.js" inline></script>
|
||||
<script src="/js/nosleep.js" inline></script>
|
||||
<script src="/js/nosleep.js" type="module" inline></script>
|
||||
<script>
|
||||
function loadScript(src, callback, type = "module") {
|
||||
let promise = new Promise((resolve, reject) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue