aboutsummaryrefslogtreecommitdiff
path: root/webAO/dom/toggleEffect.js
blob: d9ba421e519a72ee2aab5f281c7eee16ea891c8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* eslint no-param-reassign: ["error",
{ "props": true, "ignorePropertyModificationsFor": ["button"] }] */
/**
 * Highlights and selects an effect for in-character chat.
 * If the same effect button is selected, then the effect is canceled.
 * @param {string} effect the new effect to be selected
 */
export function toggleEffect(button) {
    if (button.classList.contains('dark')) {
        button.className = 'client_button';
    } else {
        button.className = 'client_button dark';
    }
}
window.toggleEffect = toggleEffect;
export default toggleEffect;