Fix the reversed genocide modifier.

Fix the popover marseylove modifier
pull/223/head
Chuck 2024-02-18 16:14:22 -08:00
parent 1043889a30
commit 114e1da100
5 changed files with 2 additions and 7 deletions

View File

@ -5385,10 +5385,6 @@ img[alt^=":"][alt*="!"] {
transform: scaleX(-1);
}
span[alt^=":"][alt*="!"] > img[alt^=":"][alt*="!"] {
transform: scaleX(1);
}
span[alt^=":"][alt*="!!"] > img[alt^=":"][alt*="!"] {
transform: scaleX(-1);
}

View File

@ -136,6 +136,7 @@ document.addEventListener("click", function(e) {
pop_instance = bootstrap.Popover.getOrCreateInstance(active, {
content: popover.innerHTML,
html: true,
sanitize: false, // already done on the back end, fixes complex emotes
});
pop_instance.show()
is_popover_visible = true

View File

@ -222,7 +222,7 @@ function markdown(t) {
const loveHtml = modifiers.has(MODIFIERS.LOVE) ? `<img loading="lazy" class="${emojiClass}" src="${SITE_FULL_IMAGES}/i/love-foreground.webp"><img loading="lazy" class="${emojiClass}" src="${SITE_FULL_IMAGES}/i/love-background.webp">` : '';
const url = modifiers.has(MODIFIERS.USER) ? `/@${emoji}/pic` : `${SITE_FULL_IMAGES}/e/${emoji}.webp`;
const modifierHtml = isTalkingFirst ? `${talkingHtml}${patHtml}${loveHtml}${typingHtml}` : `${patHtml}${talkingHtml}${loveHtml}${typingHtml}`;
input = input.replace(old, `<span class="${patClass} ${spanClass} ${genocideClass}" data-bs-toggle="tooltip">${modifierHtml}<img loading="lazy" class="${emojiClass} ${imgClass} ${lovedClass}" src="${url}"></span>`);
input = input.replace(old, `<span class="${patClass} ${spanClass} ${genocideClass}" data-bs-toggle="tooltip">${modifierHtml}<img loading="lazy" class="${emojiClass} ${imgClass} ${lovedClass} ${modifiers.has(MODIFIERS.REVERSED) ? mirroredClass : ''}" src="${url}"></span>`);
} else {
input = input.replace(old, `<img loading="lazy" class="${emojiClass} ${modifiers.has(MODIFIERS.REVERSED) ? mirroredClass : ''}" src="${SITE_FULL_IMAGES}/e/${emoji}.webp">`);
}

View File

@ -1046,7 +1046,6 @@ class User(Base):
'id': self.id
}
return {'username': self.username,
'original_username': self.original_username,
'url': self.url,

View File

@ -332,7 +332,6 @@ def settings_personal_post(v):
bio = process_files(request.files, v, bio)
if len(bio) > BIO_FRIENDS_ENEMIES_LENGTH_LIMIT:
abort(400, f'Your bio is too long (max {BIO_FRIENDS_ENEMIES_LENGTH_LIMIT} characters)')
bio_html = sanitize(bio, blackjack="bio")
if len(bio_html) > BIO_FRIENDS_ENEMIES_HTML_LENGTH_LIMIT:
abort(400, "Your rendered bio is too long!")