From c7cc5aea63fb0e7e8ca67c636099498b415b7b54 Mon Sep 17 00:00:00 2001 From: H4CK3R-01 <44125287+H4CK3R-01@users.noreply.github.com> Date: Thu, 1 Jul 2021 09:23:50 +0200 Subject: [PATCH] Manual is shown several times --- public/css/components.css | 5 +++++ public/index.html | 1 + public/js/index.js | 4 +++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/public/css/components.css b/public/css/components.css index 0159293..65e42ad 100644 --- a/public/css/components.css +++ b/public/css/components.css @@ -94,4 +94,9 @@ main { background-color: #fefefe; width: 100%; height: calc(100% - 50px); +} + +#manual { + width: 100%; + height: calc(100% - 50px); } \ No newline at end of file diff --git a/public/index.html b/public/index.html index ea55125..4519f18 100644 --- a/public/index.html +++ b/public/index.html @@ -59,6 +59,7 @@ onclick="document.getElementById('modal').style.display = 'none';">close
+ diff --git a/public/js/index.js b/public/js/index.js index f69d669..618d46f 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -57,6 +57,8 @@ function open_manual() { let frame = document.createElement('iframe'); frame.src = 'data/Spielanleitung.pdf'; frame.id = 'spielanleitung'; - document.getElementById('content').appendChild(frame); + + document.getElementById('manual').innerHTML = ''; + document.getElementById('manual').appendChild(frame); document.getElementById('modal').style.display = 'block'; } \ No newline at end of file