From 239457b02ce8099e2804a794a59e82467ae775d5 Mon Sep 17 00:00:00 2001 From: xenofem Date: Mon, 22 Jun 2020 00:08:22 -0400 Subject: [PATCH] show/hide back button for hex animation --- content/hypno/hex/hex.css | 7 +++++++ content/hypno/hex/hex.js | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/content/hypno/hex/hex.css b/content/hypno/hex/hex.css index 3372df6..418cda2 100644 --- a/content/hypno/hex/hex.css +++ b/content/hypno/hex/hex.css @@ -30,6 +30,13 @@ #controls { display: none; + background-color: rgba(0, 0, 0, 0.7); + padding: 5px; + border-radius: 10px; +} + +#reload { + display: none; } @keyframes death { diff --git a/content/hypno/hex/hex.js b/content/hypno/hex/hex.js index 5d4412c..0994515 100644 --- a/content/hypno/hex/hex.js +++ b/content/hypno/hex/hex.js @@ -206,3 +206,10 @@ for (var i = 0; i < width; ++i) { } setInterval(prestonStep, 1000); + +var showControls = false; + +window.onclick = function () { + document.getElementById("controls").style.display = showControls ? "none" : "block"; + showControls = !showControls; +}