diff --git a/files/assets/css/main.css b/files/assets/css/main.css
index dd1efa3e4..eefe588f0 100644
--- a/files/assets/css/main.css
+++ b/files/assets/css/main.css
@@ -4468,7 +4468,7 @@ blockquote p {
margin: 1.75rem auto !important;
}
}
-.in-comment-image:not(img[src*="/uid/"]):not(img[src*="/pp/"]), .preview img, .img:not(img[src*="/uid/"]):not(img[src*="/pp/"]), img[alt^=":not(img[src*="/pp/"]), .img:not(img[src*="/uid/"]):not(img[src*="/pp/"]), img[alt^=":not(.pat-hand) {
max-height: 150px !important;
max-width: 100% !important;
border-radius: 0.2rem !important;
@@ -4601,7 +4601,7 @@ img[pat] {
text-align: center;
object-fit: cover;
}
-img[pat][src^="/pp/"] {
+img[pat][src^="/pp/"], img[pat][src$="/pic"] {
border-radius: 50%;
}
.pat-hand {
diff --git a/files/assets/js/marked.js b/files/assets/js/marked.js
index 7b7764a03..6f67cc8be 100644
--- a/files/assets/js/marked.js
+++ b/files/assets/js/marked.js
@@ -4,23 +4,20 @@ function markdown(first, second) {
var input = document.getElementById(first).value;
input = input.replace(/\|\|(.*?)\|\|/g, '$1')
- var emojis = Array.from(input.matchAll(/:([#!A-Za-z0-9]{1,30}?):/gi))
+ var emojis = Array.from(input.matchAll(/:([^\s]{1,31}):/gi))
if(emojis != null){
for(i = 0; i < emojis.length; i++){
- var emoji = emojis[i][0];
- if (emoji.includes('marseyrandom')) continue
- var remoji = emoji.replace(/:/g,'').toLowerCase();
- if (remoji.startsWith("!#") || remoji.startsWith("#!"))
- {
- input = input.replace(emoji, "
")
- } else if (remoji.startsWith("#"))
- {
- input = input.replace(emoji, "
")
- } else if (remoji.startsWith("!"))
- {
- input = input.replace(emoji, "
")
+ var old = emojis[i][0];
+ if (old.includes('marseyrandom')) continue
+ var emoji = old.replace(/[:!@#]/g,'').toLowerCase();
+ var mirroredClass = old.indexOf('!') == -1 ? '' : 'mirrored';
+ var emojiClass = old.indexOf('#') == -1 ? 'emoji' : 'emoji-lg';
+ if (emoji.endsWith('pat')) {
+ emoji = emoji.substr(0, emoji.length - 3);
+ var url = old.indexOf('@') != -1 ? `/@${emoji}/pic` : `/e/${emoji}.webp`;
+ input = input.replace(old, `
`);
} else {
- input = input.replace(emoji, "
")
+ input = input.replace(old, `
`);
}
}
}