Added support for binding functions for Mermaid diagrams

This commit is contained in:
squidfunk
2022-11-30 22:19:39 +01:00
parent 907705a519
commit 3c326e80d2
11 changed files with 26 additions and 20 deletions

View File

@@ -49,12 +49,12 @@ const container = document.createElement("div")
document.body.appendChild(container)
/* Append button next to palette toggle */
const header = document.querySelector(".md-header__option")
const header = document.querySelector(".md-header__title")
if (header) {
const button = document.createElement("button")
button.className = "md-header__button md-icon ᴴₒᴴₒᴴₒ__button"
if (header.parentElement)
header.parentElement.insertBefore(button, header)
header.insertAdjacentElement("afterend", button)
/* Toggle animation */
const on$ = new ReplaySubject<boolean>(1)