|
|
@@ -1,7 +1,7 @@
|
|
|
<!doctype html>
|
|
|
|
|
|
<html>
|
|
|
-<markdown-html version="1.9.1" author="PJ568" repo="https://github.com/PJ-568/markdown.html"
|
|
|
+<markdown-html version="1.10.0" author="PJ568" repo="https://github.com/PJ-568/markdown.html"
|
|
|
license="CC BY-SA 4.0 International"></markdown-html>
|
|
|
|
|
|
<head>
|
|
|
@@ -10,10 +10,12 @@
|
|
|
<meta name="keywords" content="markdown, html, renderer, low-dependency, one-click deployment">
|
|
|
<meta name="author" content="PJ568">
|
|
|
<meta name="viewport" content="width=256, initial-scale=1">
|
|
|
- <script defer src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-y/marked/4.0.2/marked.min.js" type="text/javascript"></script>
|
|
|
+ <script defer src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-y/marked/4.0.2/marked.min.js"
|
|
|
+ type="text/javascript"></script>
|
|
|
<script src="https://lib.baomitu.com/pjax/0.2.8/pjax.min.js" type="text/javascript"></script>
|
|
|
<script src="https://lib.baomitu.com/translate.js/3.7.2/translate.js" type="text/javascript"></script>
|
|
|
- <script src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-y/Darkmode.js/1.5.7/darkmode-js.min.js" type="text/javascript"></script>
|
|
|
+ <script src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-y/Darkmode.js/1.5.7/darkmode-js.min.js"
|
|
|
+ type="text/javascript"></script>
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/mermaid/11.5.0/mermaid.min.js" type="text/javascript"></script>
|
|
|
<script>
|
|
|
// 使用 IIFE 包裹以避免全局变量污染
|
|
|
@@ -546,6 +548,15 @@
|
|
|
});
|
|
|
//// 点击事件委托
|
|
|
document.addEventListener('click', function (event) {
|
|
|
+ const imgOrSvg = event.target.closest('.content img, .content svg');
|
|
|
+ if (imgOrSvg) {
|
|
|
+ const url = imgOrSvg.getAttribute('src') || imgOrSvg.getAttribute('xlink:href');
|
|
|
+ if (url) {
|
|
|
+ window.open(url, '_blank');
|
|
|
+ event.preventDefault();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
if (event.target.closest('.back-btn')) {
|
|
|
window.history.back();
|
|
|
} else if (event.target.closest('.refresh-btn')) {
|