mirror of
https://github.com/HananoshikaYomaru/openfreebooks.git
synced 2026-11-12 20:45:52 +00:00
14 lines
531 B
TypeScript
14 lines
531 B
TypeScript
/**
|
|
* Shared JavaScript for all mathematics chapters.
|
|
* Loaded on every /math/{slug}/ page via main.tsx + generated subject-modules.ts.
|
|
*/
|
|
|
|
/** Normalize checkpoint markup and run any math-only setup on the chapter article. */
|
|
export function initMathSubject(root: HTMLElement): void {
|
|
for (const panel of root.querySelectorAll<HTMLElement>(".book-question__answer")) {
|
|
panel.classList.remove("book-question__answer");
|
|
panel.classList.add("book-question__solution");
|
|
}
|
|
}
|
|
|
|
export const initSubject = initMathSubject;
|