diff --git a/public/index.html b/public/index.html index 1ab98bb..ea55125 100644 --- a/public/index.html +++ b/public/index.html @@ -17,7 +17,7 @@
Spielanleitung
+ onclick="open_manual();">Spielanleitung
PM-Game
DATE_TO_BE_REPLACEDCOMMIT_TO_BE_REPLACED
@@ -59,11 +59,6 @@ onclick="document.getElementById('modal').style.display = 'none';">close
- diff --git a/public/js/index.js b/public/js/index.js index 8493e39..f69d669 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -51,4 +51,12 @@ document.getElementById('ok').addEventListener('click', function () { socket.on('user left', function (data) { addLogMessage(data + ' left'); }); -}); \ No newline at end of file +}); + +function open_manual() { + let frame = document.createElement('iframe'); + frame.src = 'data/Spielanleitung.pdf'; + frame.id = 'spielanleitung'; + document.getElementById('content').appendChild(frame); + document.getElementById('modal').style.display = 'block'; +} \ No newline at end of file