Skip to content

Commit

Permalink
standard push
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Schwartz committed Jan 27, 2024
1 parent e65a070 commit 33ae0b2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 8 additions & 1 deletion games.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,9 @@ document.addEventListener('DOMContentLoaded', function() {
var bodyContent = document.querySelector('.main-content');
var letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'];
var userLanguage = getCookie('userLanguage')

var languageDropdown = document.getElementById('language-dropdown');


// Only show modal if cookie consent hasn't been given
console.log("Checking cookie consent status");
if (!getCookie('cookieConsent')) {
Expand All @@ -292,6 +294,11 @@ document.addEventListener('DOMContentLoaded', function() {
bodyContent.classList.remove('blur-background');
});

if (languageDropdown) {
languageDropdown.addEventListener('change', function() {
setLanguagePreference(this.value);
});
}
// Setup event listeners for letter buttons
letters.forEach(function(letter) {
var button = document.getElementById('button-' + letter);
Expand Down
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ <h1>Learn Language with applications</h1>
<li><a href="#work">how to</a></li>
<li><a href="#contact">Contact</a></li>
<li><div class="language-selector">
<select id="language-dropdown" onchange="setLanguagePreference(this.value)">
<select id="language-dropdown">
<option value="en">English</option>
<option value="fr">Français</option>
<option value="zh">中文</option>
<!-- Add other languages here if needed -->
</select>
</div>
Expand Down

0 comments on commit 33ae0b2

Please sign in to comment.