⚡️⭐️ Checkpoint
./views/index.html:1954897/42155 ./public/script.js:1954897/5660
This commit is contained in:
+15
-6
@@ -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()
|
||||
})
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
}());
|
||||
Reference in New Issue
Block a user