From 5f0d539134e3f8fe94e494fb96d4f9ca91b70f62 Mon Sep 17 00:00:00 2001 From: RossAscends <124905043+RossAscends@users.noreply.github.com> Date: Fri, 5 May 2023 17:37:23 +0900 Subject: [PATCH] fixed zoomed avatars - broke due to wrapped div added around avatar for timer spacing --- public/script.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/public/script.js b/public/script.js index 9ebc97aa6..b3c1f6e6b 100644 --- a/public/script.js +++ b/public/script.js @@ -5610,12 +5610,14 @@ $(document).ready(function () { 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 + console.log(avatarSrc); + if ($(this).parent().parent().attr('is_user') == 'true') { //handle user avatars $("#zoomed_avatar").attr('src', thumbURL); - } else if ($(this).parent().attr('is_system') == 'true') { //handle system avatars + } else if ($(this).parent().parent().attr('is_system') == 'true') { //handle system avatars $("#zoomed_avatar").attr('src', thumbURL); - } else if ($(this).parent().attr('is_user') == 'false') { //handle char avatars + } else if ($(this).parent().parent().attr('is_user') == 'false') { //handle char avatars $("#zoomed_avatar").attr('src', avatarSrc); } $('#avatar_zoom_popup').toggle();