better img support for activities

This commit is contained in:
Bingus_Violet 2023-11-20 18:50:02 -06:00
parent effbcc34da
commit 5a8e1e8db2
2 changed files with 10 additions and 0 deletions

View file

@ -117,6 +117,8 @@ function pageUpdate() {
return 'https://' + image.substr(image.indexOf('https/') + 6, image.length)
} else if (image.includes("spotify")) {
return 'https://i.scdn.co/image/' + image.substr(image.indexOf('spotify:') + 8, image.length)
} else {
return `https://cdn.discordapp.com/app-assets/${activity.application_id}/${image}.png`
}
}
}
@ -159,6 +161,7 @@ function pageUpdate() {
</div>
`
} else {
console.log(get_img())
addedHTML += `
<div class="chip activity col-md-6 testing">
<p>

View file

@ -80,6 +80,13 @@ a {
width: 100%;
}
.activity > img {
width: 128px;
height: 128px;
aspect-ratio: 1/1;
object-fit: cover;
}
a:hover {
color: white;
transition: 0.5s all cubic-bezier(0.075, 0.82, 0.165, 1);