From 57852731e46e4c2ec979f2bc2cb59ad257b55b6d Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Sun, 2 Jun 2024 18:31:08 -0500 Subject: [PATCH] FIX < SYMBOLS! --- overcomplicatedStatuses.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/overcomplicatedStatuses.js b/overcomplicatedStatuses.js index 5b6c388..41ffe00 100644 --- a/overcomplicatedStatuses.js +++ b/overcomplicatedStatuses.js @@ -28,6 +28,10 @@ function get_img_url(activity, size = "large_image") { return null } +function makeCompat(string) { + return string.replaceAll("<", "<").replaceAll(">", ">") +} + function timeFormatter(seconds) { seconds = Math.ceil(seconds) 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) { html += ` -
Album: ${activity.assets.large_text || " "} -
Artist: ${activity.state || " "} +
Album: ${makeCompat(activity.assets.large_text || " ")} +
Artist: ${makeCompat(activity.state || " ")} ` } else { html += "
" if (activity.state.includes(";")) { html += "Artists: " } else { html += "Artist: " } - html += `${activity.state || " "}` + html += `${makeCompat(activity.state || " ")}` } return html @@ -119,7 +123,7 @@ module.exports = {

Listening to ${activity.name} -
Song: ${activity.details || " "} +
Song: ${makeCompat(activity.details || " ")} ${songStats()}