Skip to content

Commit

Permalink
Refactor internals for readability
Browse files Browse the repository at this point in the history
seems less noisy
  • Loading branch information
FND committed Nov 15, 2019
1 parent c16f32c commit 08eff82
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -494,11 +494,10 @@ <h1>Responsive Mobile Navigation</h1>

function addBodyClass (className) {
let { body } = document;
body.classList.remove('red-theme')
body.classList.remove('green-theme')
body.classList.remove('teal-theme')
body.classList.remove('indigo-theme')
body.classList.remove('purple-theme')
let themes = ['red-theme', 'green-theme', 'teal-theme', 'indigo-theme', 'purple-theme'];
for (let theme of themes) {
body.classList.remove(theme)
}
if (className) {
body.classList.add(className)
}
Expand Down

0 comments on commit 08eff82

Please sign in to comment.