🐘👽 Checkpoint

./public/script.js:1954897/2956
./server.js:1954897/2812
This commit is contained in:
Glitch (tabu)
2019-07-01 12:18:06 +00:00
parent 6646907e85
commit e3ca0b8030
2 changed files with 33 additions and 22 deletions
+9 -9
View File
@@ -1,12 +1,12 @@
(function() {
'use strict';
let prev = null
'use strict'
const wordBank = document.getElementById('wordBank')
const input = document.getElementById('input')
, input = document.getElementById('input')
let prev = null
;[].forEach.call(
document.querySelectorAll('[data-open]'),
function (el) {
function (el, i, arr) {
el.addEventListener('click', function (e) {
const iam = Array.from(document.body.children).filter(el => !el.hidden)[0];
iam.hidden = true;
@@ -16,23 +16,23 @@
document.getElementById(this.dataset.open).hidden = false
}
prev = iam
});
})
}
)
;[].forEach.call(
document.querySelectorAll('[data-fire]'),
function (el) {
function (el, i, arr) {
el.addEventListener('click', function (e) {
document.dispatchEvent(new Event(this.dataset.fire))
});
})
}
)
document.addEventListener('word', (e) => {
// wordBank.innerHTML = ''
wordBank.innerHTML = Math.random()
});
})
document.addEventListener('fs', (e) => {
if (!screen.orientation.lock) return
@@ -44,7 +44,7 @@
document.exitFullscreen()
})
})
});
})
}());