Skip to content

Commit

Permalink
(feat black bkground code added in js)
Browse files Browse the repository at this point in the history
  • Loading branch information
lioneltchami committed Nov 30, 2023
1 parent 0d6af80 commit 870aec4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions visual-git-guide.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,11 @@ _gaq.push(['_trackPageview']);
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

// Adding black background
document.addEventListener('DOMContentLoaded', (event) => {
const toggleButton = document.getElementById('dark-mode-toggle');
toggleButton.addEventListener('click', function() {
document.body.classList.toggle('dark-mode');
});
});

0 comments on commit 870aec4

Please sign in to comment.