diff --git a/ling_chair_http/chat-message.css b/ling_chair_http/chat-message.css
index 755dfb5..dd59cab 100644
--- a/ling_chair_http/chat-message.css
+++ b/ling_chair_http/chat-message.css
@@ -82,4 +82,9 @@
width: 50px;
height: 50px;
border-radius: 50%;
-}
\ No newline at end of file
+}
+
+.message-image {
+ max-width: 40%;
+ max-height: 40%;
+}
diff --git a/ling_chair_http/finally.js b/ling_chair_http/finally.js
index 91295f5..6595466 100644
--- a/ling_chair_http/finally.js
+++ b/ling_chair_http/finally.js
@@ -53,11 +53,11 @@ ChatMsgAdapter.initMsgElementEvents()
ChatMsgAdapter.initInputResizer()
-const showLinkDialog = (link) => mdui.alert(decodeURIComponent(link) + "
如果你确认此链接是安全的, 那么请点我", '链接', () => { }, { confirmText: "关闭" })
+const showLinkDialog = (link) => mdui.alert(decodeURI(link) + "
如果你确认此链接是安全的, 那么请点我", '链接', () => { }, { confirmText: "关闭" })
-const showImageDialog = (link, id, alt) => mdui.alert(`此图片链接来源未知: ${decodeURIComponent(link)}
如果你希望加载, 请点我`, '外部图片', () => { }, { confirmText: "关闭" })
+const showImageDialog = (link, id, alt) => mdui.alert(`此图片链接来源未知: ${decodeURI(link)}
如果你希望加载, 请点我`, '外部图片', () => { }, { confirmText: "关闭" })
-const showCodeDialog = (code) => mdui.alert(`
${decodeURIComponent(code)}`, '代码块', () => { }, { confirmText: "关闭" })
+const showCodeDialog = (code) => mdui.alert(`${decodeURI(code)}`, '代码块', () => { }, { confirmText: "关闭" })
const renderer = {
heading(text, level) {
@@ -70,23 +70,28 @@ const renderer = {
return text
},
link(href, title, text) {
- return `[链接] ${text}`
+ return `[链接] ${text}`
},
image(href, title, text) {
let h = Hash.sha256(href)
- if (new URL(href).hostname === new URL(location.href))
- return `