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