Big picture fixes (#5565)

This commit is contained in:
Lounger 2024-02-25 18:10:16 +01:00 committed by GitHub
parent 45c4cd01c5
commit 0f68c6fb5b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 0 deletions

View File

@ -717,6 +717,11 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* {
width: calc((100vw - 880px - 120px) /2); width: calc((100vw - 880px - 120px) /2);
} }
.pfp_character {
position: relative;
z-index: 100;
}
.pfp_character:hover { .pfp_character:hover {
cursor: pointer; cursor: pointer;
} }

View File

@ -354,6 +354,12 @@ function addBigPicture() {
var timestamp = new Date().getTime(); var timestamp = new Date().getTime();
imgElement.src = "/file/cache/pfp_character.png?time=" + timestamp; imgElement.src = "/file/cache/pfp_character.png?time=" + timestamp;
imgElement.classList.add("bigProfilePicture"); 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; var imgElementParent = document.getElementById("chat").parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;
imgElementParent.appendChild(imgElement); imgElementParent.appendChild(imgElement);