index.js 265 B

12345678910
  1. let path = null
  2. setInterval(() => {
  3. if (path !== window.location.pathname) {
  4. path = window.location.pathname
  5. window.mermaid.initialize({ theme: 'default' })
  6. window.mermaid.init(undefined, document.querySelectorAll('.lang-mermaid'))
  7. }
  8. }, 1000)