From 9072885e792b214c8cd65b4cd5ca00195f0fa17c Mon Sep 17 00:00:00 2001 From: Tom Schwartz Date: Fri, 2 Feb 2024 15:42:38 +0100 Subject: [PATCH] standard push --- games.js | 9 ++++++++- index.html | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/games.js b/games.js index 3530854..7446078 100644 --- a/games.js +++ b/games.js @@ -296,7 +296,8 @@ document.addEventListener('DOMContentLoaded', function() { var languageDropdown = document.getElementById('language-dropdown'); var hamburger = document.querySelector('.hamburger-menu'); var navUL = document.querySelector('nav ul'); - + var startGameButton = document.getElementById('start-game'); + // Only show modal if cookie consent hasn't been given console.log("Checking cookie consent status"); if (!getCookie('cookieConsent')) { @@ -330,6 +331,12 @@ document.addEventListener('DOMContentLoaded', function() { hamburger.addEventListener('click', function() { navUL.classList.toggle('active'); }); + + // Start Game button + if (startGameButton) { + startGameButton.addEventListener('click', startGame); + } + // Setup event listeners for letter buttons letters.forEach(function(letter) { var button = document.getElementById('button-' + letter); diff --git a/index.html b/index.html index e957ff7..6fe69b7 100644 --- a/index.html +++ b/index.html @@ -54,7 +54,7 @@

Languapps

hangman
- +