⚡️⭐️ Checkpoint

./views/index.html:1954897/42155
./public/script.js:1954897/5660
This commit is contained in:
Glitch (hello-express)
2019-06-28 05:33:33 +00:00
parent c77d96a571
commit d13977cefc
2 changed files with 26 additions and 9 deletions
+15 -6
View File
@@ -3,6 +3,8 @@
var btns = document.querySelectorAll('[data-open]')
let prev = null
for (var i = 0; i < btns.length; i++) {
;btns[i].addEventListener('click', function (e) {
@@ -17,15 +19,22 @@
document.getElementById(this.dataset.open).hidden = false
}
prev = iam
console.log({iam, prev})
})
}
window.addEventListener("mousedown", function () {
requestAnimationFrame(function () {
screen.orientation.lock('landscape')
})
}, false);
const fs = document.getElementById('fs')
fs.addEventListener('click', e => {
if (!screen.orientation.lock) return
document
.documentElement
.requestFullscreen()
.then(function () {
screen.orientation.lock('landscape').catch(function () {
document.exitFullscreen()
})
})
});
}());