aboutsummaryrefslogtreecommitdiff
path: root/webAO/dom/toggleEffect.js
blob: ac83f2c057a3295797571d71d4077c20976e926b (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;