1
0
mirror of https://github.com/jenil/chota.git synced 2023-08-10 21:13:07 +03:00
chota/docs/main.js
2020-05-16 19:55:33 +05:30

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'));
}