mirror of
https://github.com/jenil/chota.git
synced 2023-08-10 21:13:07 +03:00
7 lines
215 B
JavaScript
7 lines
215 B
JavaScript
function switchMode(el) {
|
|
const bodyClass = document.body.classList;
|
|
bodyClass.contains('dark')
|
|
? (el.innerHTML = '☀️', bodyClass.remove('dark'))
|
|
: (el.innerHTML = '🌙', bodyClass.add('dark'));
|
|
}
|