mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Merge branch 'staging' of https://github.com/SillyTavern/SillyTavern into staging
This commit is contained in:
@ -8504,6 +8504,17 @@ jQuery(async function () {
|
||||
let targetAvatarImg = thumbURL.substring(thumbURL.lastIndexOf("=") + 1);
|
||||
let charname = targetAvatarImg.replace('.png', '');
|
||||
|
||||
// Remove existing zoomed avatars for characters that are not the clicked character when moving UI is not enabled
|
||||
if (!power_user.movingUI) {
|
||||
$('.zoomed_avatar').each(function () {
|
||||
const currentForChar = $(this).attr('forChar');
|
||||
if (currentForChar !== charname && typeof currentForChar !== 'undefined') {
|
||||
console.debug(`Removing zoomed avatar for character: ${currentForChar}`);
|
||||
$(this).remove();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
let avatarSrc = isDataURL(thumbURL) ? thumbURL : charsPath + targetAvatarImg;
|
||||
if ($(`.zoomed_avatar[forChar="${charname}"]`).length) {
|
||||
console.debug('removing container as it already existed')
|
||||
|
Reference in New Issue
Block a user