Skip to content

Commit

Permalink
profile discord emojis
Browse files Browse the repository at this point in the history
  • Loading branch information
3r1s-s committed Aug 5, 2024
1 parent df77c1d commit 83b9833
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion profile/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ function fetchprofile() {
let quote;
if (typeof md !== 'undefined') {
md.disable(['image']);
quote = md.render(data.quote).replace(/<a(.*?)>/g, '<a$1 target="_blank">');
quote = md.render(data.quote)
.replace(/<a(.*?)>/g, '<a$1 target="_blank">')
.replace(/&lt;:(\w+):(\d+)&gt;/g, '<img src="https://cdn.discordapp.com/emojis/$2.webp?size=96&quality=lossless" alt="$1" title="$1" class="emoji">')
.replace(/&lt;a:(\w+):(\d+)&gt;/g, '<img src="https://cdn.discordapp.com/emojis/$2.gif?size=96&quality=lossless" alt="$1" title="$1" class="emoji">'); // might remove this later, will all discord emojis in general
} else {
// fallback for when md doenst work
// figure this issue OUT
Expand Down

0 comments on commit 83b9833

Please sign in to comment.