فهرست منبع

【修复】优化图片和 SVG 在新标签页中的打开方式

- 在 index.html 中更新了 markdown-html 版本号至 1.10.1
- 添加了对图片和 SVG 在新标签页中打开的逻辑,提高了用户体验
PJ568 1 سال پیش
والد
کامیت
8ab2ef611b
2فایلهای تغییر یافته به همراه7 افزوده شده و 1 حذف شده
  1. 7 1
      index.html
  2. 0 0
      index.min.html

+ 7 - 1
index.html

@@ -1,7 +1,7 @@
 <!doctype html>
 
 <html>
-<markdown-html version="1.10.0" author="PJ568" repo="https://github.com/PJ-568/markdown.html"
+<markdown-html version="1.10.1" author="PJ568" repo="https://github.com/PJ-568/markdown.html"
   license="CC BY-SA 4.0 International"></markdown-html>
 
 <head>
@@ -555,6 +555,12 @@
             window.open(url, '_blank');
             event.preventDefault();
             return;
+          } else {
+            const newWindow = window.open('', '_blank');
+            newWindow.document.write(imgOrSvg.outerHTML);
+            newWindow.document.close();
+            event.preventDefault();
+            return;
           }
         }
         if (event.target.closest('.back-btn')) {

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
index.min.html


برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است