(tag, attrs = {}, html = '')
| 66 | } |
| 67 | |
| 68 | function makeEl(tag, attrs = {}, html = '') { |
| 69 | const el = document.createElement(tag); |
| 70 | Object.entries(attrs).forEach(([k, v]) => { |
| 71 | if (k === 'className') { |
| 72 | el.className = String(v || ''); |
| 73 | return; |
| 74 | } |
| 75 | el.setAttribute(k, String(v || '')); |
| 76 | }); |
| 77 | if (html) el.innerHTML = html; |
| 78 | return el; |
| 79 | } |
| 80 | |
| 81 | function isDarkModeEnabled() { |
| 82 | return !!( |