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)
|
return 'https://' + image.substr(image.indexOf('https/') + 6, image.length)
|
||||||
} else if (image.includes("spotify")) {
|
} else if (image.includes("spotify")) {
|
||||||
return 'https://i.scdn.co/image/' + image.substr(image.indexOf('spotify:') + 8, image.length)
|
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>
|
</div>
|
||||||
`
|
`
|
||||||
} else {
|
} else {
|
||||||
|
console.log(get_img())
|
||||||
addedHTML += `
|
addedHTML += `
|
||||||
<div class="chip activity col-md-6 testing">
|
<div class="chip activity col-md-6 testing">
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -80,6 +80,13 @@ a {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.activity > img {
|
||||||
|
width: 128px;
|
||||||
|
height: 128px;
|
||||||
|
aspect-ratio: 1/1;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
a:hover {
|
a:hover {
|
||||||
color: white;
|
color: white;
|
||||||
transition: 0.5s all cubic-bezier(0.075, 0.82, 0.165, 1);
|
transition: 0.5s all cubic-bezier(0.075, 0.82, 0.165, 1);
|
||||||
|
|
Loading…
Reference in a new issue