diff --git a/public/script.js b/public/script.js index 3d2df3128..f307ea8a3 100644 --- a/public/script.js +++ b/public/script.js @@ -5458,22 +5458,22 @@ $(document).ready(function () { $(document).on('click', '.mes .avatar', function () { - if (window.innerWidth > 1000 || $('body').hasClass('waifuMode')) { + //if (window.innerWidth > 1000 || $('body').hasClass('waifuMode')) { - let thumbURL = $(this).children('img').attr('src'); - let charsPath = '/characters/' - let targetAvatarImg = thumbURL.substring(thumbURL.lastIndexOf("=") + 1); - let avatarSrc = charsPath + targetAvatarImg; - if ($(this).parent().attr('is_user') == 'true') { //handle user avatars - $("#zoomed_avatar").attr('src', thumbURL); - } else if ($(this).parent().attr('is_system') == 'true') { //handle system avatars - $("#zoomed_avatar").attr('src', thumbURL); - } else if ($(this).parent().attr('is_user') == 'false') { //handle char avatars - $("#zoomed_avatar").attr('src', avatarSrc); - } - $('#avatar_zoom_popup').toggle(); + let thumbURL = $(this).children('img').attr('src'); + let charsPath = '/characters/' + let targetAvatarImg = thumbURL.substring(thumbURL.lastIndexOf("=") + 1); + let avatarSrc = charsPath + targetAvatarImg; + if ($(this).parent().attr('is_user') == 'true') { //handle user avatars + $("#zoomed_avatar").attr('src', thumbURL); + } else if ($(this).parent().attr('is_system') == 'true') { //handle system avatars + $("#zoomed_avatar").attr('src', thumbURL); + } else if ($(this).parent().attr('is_user') == 'false') { //handle char avatars + $("#zoomed_avatar").attr('src', avatarSrc); + } + $('#avatar_zoom_popup').toggle(); - } else { return; } + //} else { return; } }); $(document).on('click', '#OpenAllWIEntries', function () { diff --git a/public/style.css b/public/style.css index dbf85f5ea..b886a5e70 100644 --- a/public/style.css +++ b/public/style.css @@ -3967,6 +3967,12 @@ body.waifuMode #avatar_zoom_popup { object-fit: cover; } + body:not(.waifuMode) #avatar_zoom_popup { + z-index: 999; + width: fit-content; + max-height: calc(60svh - 60px); + } + body.waifuMode #avatar_zoom_popup { width: fit-content; max-height: calc(60svh - 60px);