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
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
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);
}
.pfp_character {
position: relative;
z-index: 100;
}
.pfp_character:hover {
cursor: pointer;
}

View file

@ -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);