FIX < SYMBOLS!
This commit is contained in:
parent
90334a68b3
commit
57852731e4
1 changed files with 8 additions and 4 deletions
|
@ -28,6 +28,10 @@ function get_img_url(activity, size = "large_image") {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function makeCompat(string) {
|
||||||
|
return string.replaceAll("<", "<").replaceAll(">", ">")
|
||||||
|
}
|
||||||
|
|
||||||
function timeFormatter(seconds) {
|
function timeFormatter(seconds) {
|
||||||
seconds = Math.ceil(seconds)
|
seconds = Math.ceil(seconds)
|
||||||
var minutes = Math.floor(seconds / 60)
|
var minutes = Math.floor(seconds / 60)
|
||||||
|
@ -98,15 +102,15 @@ module.exports = {
|
||||||
|
|
||||||
if (activity.assets && activity.assets.large_text != activity.details && activity.state.length + activity.assets.large_text.length < 100) {
|
if (activity.assets && activity.assets.large_text != activity.details && activity.state.length + activity.assets.large_text.length < 100) {
|
||||||
html += `
|
html += `
|
||||||
<br> Album: ${activity.assets.large_text || " "}
|
<br> Album: ${makeCompat(activity.assets.large_text || " ")}
|
||||||
<br> Artist: ${activity.state || " "}
|
<br> Artist: ${makeCompat(activity.state || " ")}
|
||||||
`
|
`
|
||||||
} else {
|
} else {
|
||||||
html += "<br>"
|
html += "<br>"
|
||||||
if (activity.state.includes(";"))
|
if (activity.state.includes(";"))
|
||||||
{ html += "Artists: " }
|
{ html += "Artists: " }
|
||||||
else { html += "Artist: " }
|
else { html += "Artist: " }
|
||||||
html += `${activity.state || " "}`
|
html += `${makeCompat(activity.state || " ")}`
|
||||||
}
|
}
|
||||||
|
|
||||||
return html
|
return html
|
||||||
|
@ -119,7 +123,7 @@ module.exports = {
|
||||||
<img src="${get_img(activity)}" title="${activity.assets.large_text || activity.assets.small_text || activity.state || ""}">
|
<img src="${get_img(activity)}" title="${activity.assets.large_text || activity.assets.small_text || activity.state || ""}">
|
||||||
<p>
|
<p>
|
||||||
Listening to ${activity.name}
|
Listening to ${activity.name}
|
||||||
<br> Song: ${activity.details || " "}
|
<br> Song: ${makeCompat(activity.details || " ")}
|
||||||
${songStats()}
|
${songStats()}
|
||||||
<br>
|
<br>
|
||||||
<span class="lengthBar lengthBar${index}"><span></span></span>
|
<span class="lengthBar lengthBar${index}"><span></span></span>
|
||||||
|
|
Loading…
Reference in a new issue