Update mermaids.sh

This commit is contained in:
Dan 2026-04-17 21:22:16 +08:00
parent 31e0c7020d
commit 48d561bb37

View File

@ -188,6 +188,7 @@ cat > /var/www/mermaid/index.html <<'HTML'
.mermaid { max-width: 90%; margin: 0 auto; }
</style>
<script>
document.addEventListener('DOMContentLoaded', function() {
mermaid.initialize({startOnLoad: false, securityLevel: 'loose'});
const editor = document.querySelector('textarea');
const preview = document.getElementById('preview');
@ -208,7 +209,8 @@ cat > /var/www/mermaid/index.html <<'HTML'
B -->|No| D[Do B]
C --> E[End]
D --> E`;
input();
editor.dispatchEvent(new Event('input'));
});
</script>
</head>
<body>