[deploy] Emit frontend bundle as ESM for browser
All checks were successful
Deploy Discord Bot / deploy (push) Successful in 38s
All checks were successful
Deploy Discord Bot / deploy (push) Successful in 38s
This commit is contained in:
@@ -1,18 +1,13 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.toggleSwitch = toggleSwitch;
|
||||
exports.getSwitch = getSwitch;
|
||||
exports.setSwitch = setSwitch;
|
||||
function toggleSwitch(el, force) {
|
||||
export function toggleSwitch(el, force) {
|
||||
if (!el)
|
||||
return;
|
||||
const next = force === undefined ? !el.classList.contains('on') : force;
|
||||
el.classList.toggle('on', next);
|
||||
}
|
||||
function getSwitch(el) {
|
||||
export function getSwitch(el) {
|
||||
return el?.classList.contains('on') ?? false;
|
||||
}
|
||||
function setSwitch(el, value) {
|
||||
export function setSwitch(el, value) {
|
||||
if (!el)
|
||||
return;
|
||||
el.classList.toggle('on', value);
|
||||
|
||||
Reference in New Issue
Block a user