better img support for activities
This commit is contained in:
parent
effbcc34da
commit
5a8e1e8db2
2 changed files with 10 additions and 0 deletions
3
index.js
3
index.js
|
@ -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>
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue