Skip to content

Commit

Permalink
Update settings.js
Browse files Browse the repository at this point in the history
  • Loading branch information
nturukunga committed Apr 25, 2024
1 parent 9189d54 commit 9a6f7ee
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,15 @@ window.addEventListener('load', function() {
document.getElementById('language-select').value = savedLanguage;
}
});
// Select the theme selector dropdown
const themeSelect = document.getElementById('theme-select');

// Add event listener for theme change
themeSelect.addEventListener('change', function() {
// Get the selected theme value
const selectedTheme = themeSelect.value;

// Update the class attribute of the body element
document.body.className = selectedTheme + '-theme';
});

0 comments on commit 9a6f7ee

Please sign in to comment.