summaryrefslogtreecommitdiff
path: root/layouts/partials/blog/face-game.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/blog/face-game.html')
-rw-r--r--layouts/partials/blog/face-game.html7
1 files changed, 4 insertions, 3 deletions
diff --git a/layouts/partials/blog/face-game.html b/layouts/partials/blog/face-game.html
index df54451..714ceff 100644
--- a/layouts/partials/blog/face-game.html
+++ b/layouts/partials/blog/face-game.html
@@ -105,6 +105,7 @@
let inAnimation = false;
const faceImg = document.getElementById('face');
+ const faceBg = document.getElementById('faceBg');
document.addEventListener('DOMContentLoaded', function() {
const moneyLink = document.getElementById('moneyLink');
@@ -133,13 +134,13 @@
updateState();
if(state !== "state3") {
- document.body.style.background = "#ff0000";
+ faceBg.style.background = "#ff0000";
state = "state5";
updateFace(getStateFaces().front);
setTimeout(
() => {
- document.body.style.background = null
+ faceBg.style.background = null
}, 10)
if(!inAnimation) {
@@ -154,7 +155,7 @@
}
else {
- document.body.style.background = "#000";
+ faceBg.style.background = "#000";
}
console.log(`state: ${state}; health: ${health}`);