Skip to content

Commit

Permalink
Big picture fixes (oobabooga#5565)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLounger authored Feb 25, 2024
1 parent 45c4cd0 commit 0f68c6f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
6 changes: 6 additions & 0 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0f68c6f

Please sign in to comment.