From 0f68c6fb5bc960a8d0579c91799a365421ca73ff Mon Sep 17 00:00:00 2001 From: Lounger <4087076+TheLounger@users.noreply.github.com> Date: Sun, 25 Feb 2024 18:10:16 +0100 Subject: [PATCH] Big picture fixes (#5565) --- css/main.css | 5 +++++ js/main.js | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/css/main.css b/css/main.css index 58b415c1..b41985d8 100644 --- a/css/main.css +++ b/css/main.css @@ -717,6 +717,11 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* { width: calc((100vw - 880px - 120px) /2); } +.pfp_character { + position: relative; + z-index: 100; +} + .pfp_character:hover { cursor: pointer; } diff --git a/js/main.js b/js/main.js index d5cb2221..219d860e 100644 --- a/js/main.js +++ b/js/main.js @@ -354,6 +354,12 @@ function addBigPicture() { var timestamp = new Date().getTime(); imgElement.src = "/file/cache/pfp_character.png?time=" + timestamp; imgElement.classList.add("bigProfilePicture"); + imgElement.addEventListener("load", function () { + this.style.visibility = "visible"; + }); + imgElement.addEventListener("error", function () { + this.style.visibility = "hidden"; + }); var imgElementParent = document.getElementById("chat").parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode; imgElementParent.appendChild(imgElement);