Added comment to queue

This commit is contained in:
Ben Arc
2021-06-24 01:23:35 +01:00
parent 95f752fd6a
commit bd1f411312

View File

@@ -138,6 +138,9 @@
pushAnim(content) {
document.getElementById('animations').style.width = content[0]
document.getElementById('animations').src = content[1]
if (content[1] != 'none') {
self.showNotif(content[1])
}
setTimeout(function () {
document.getElementById('animations').src = ''
}, 5000)
@@ -259,22 +262,22 @@
console.log(e.data)
res = e.data.split('-')
if (res[0] == 'rocket') {
addTask(['40%', '/copilot/static/rocket.gif'])
addTask(['40%', '/copilot/static/rocket.gif', res[1]])
}
if (res[0] == 'face') {
addTask(['35%', '/copilot/static/face.gif'])
addTask(['35%', '/copilot/static/face.gif', res[1]])
}
if (res[0] == 'bitcoin') {
addTask(['30%', '/copilot/static/bitcoin.gif'])
addTask(['30%', '/copilot/static/bitcoin.gif', res[1]])
}
if (res[0] == 'confetti') {
addTask(['100%', '/copilot/static/confetti.gif'])
addTask(['100%', '/copilot/static/confetti.gif', res[1]])
}
if (res[0] == 'martijn') {
addTask(['40%', '/copilot/static/martijn.gif'])
addTask(['40%', '/copilot/static/martijn.gif', res[1]])
}
if (res[0] == 'rick') {
addTask(['40%', '/copilot/static/rick.gif'])
addTask(['40%', '/copilot/static/rick.gif', res[1]])
}
if (res[0] == 'true') {
document.getElementById('videoCamera').style.width = '20%'
@@ -284,10 +287,6 @@
document.getElementById('videoCamera').style.width = '100%'
document.getElementById('videoScreen').src = null
}
console.log(res[1])
if (res[1] != 'none') {
self.showNotif(res[1])
}
}
this.connection.onopen = () => this.launch
}