MCPcopy Create free account
hub / github.com/Monogatari/Monogatari / _handleCustomClasses

Method _handleCustomClasses

src/actions/Dialog.ts:223–234  ·  view source on GitHub ↗
(element: HTMLElement | undefined)

Source from the content-addressed store, hash-verified

221 }
222
223 _handleCustomClasses(element: HTMLElement | undefined): void {
224 if (!element) {
225 return;
226 }
227
228 // The unread is a special one used by the nvl mode so we ignore that
229 Array.from(element.classList)
230 .filter(c => c !== 'unread')
231 .forEach(cls => element.classList.remove(cls));
232
233 this.classes.forEach(className => element.classList.add(className));
234 }
235
236 _setCharacter(id: string, expression: string | undefined): void {
237 this.character = this.engine.character(id);

Callers 4

displayCenteredDialogMethod · 0.95
displayNvlDialogMethod · 0.95
applyMethod · 0.95
revertMethod · 0.95

Calls 1

removeMethod · 0.65

Tested by

no test coverage detected