aboutsummaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-09-23 14:29:55 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-09-23 14:29:55 +0800
commit98c4fe9410c9144c26f389cf5290574f778d7967 (patch)
treebc7e51c51e05dc164fe56a258fc09d70a3723c54 /src/utils
parent645f68eedcd17edb7209fa12fdcff099460cba93 (diff)
downloadSoopyV2-98c4fe9410c9144c26f389cf5290574f778d7967.tar.gz
SoopyV2-98c4fe9410c9144c26f389cf5290574f778d7967.tar.bz2
SoopyV2-98c4fe9410c9144c26f389cf5290574f778d7967.zip
+meta
+ potentially fix links in g chat + if you are using sbgbot shows links eg for images in g chat again
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/utils.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/utils.js b/src/utils/utils.js
index 1f6cd6e..015643d 100644
--- a/src/utils/utils.js
+++ b/src/utils/utils.js
@@ -130,7 +130,7 @@ let utils = {
return c
}, ["&" + color]).map(a => {
if (a.match(/(?:(?:https?|ftp|file):\/\/|www\.|ftp\.)(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$])/igm)) {
- return new TextComponent("&" + color + "&n" + a + "&" + color + ' ').setHover("show_text", "Click to open " + a.trim().replace(/^(?:[&§][0-9a-fmn])+|(?:[&§][0-9a-fmn])+$/g, "")).setClick("open_url", a.trim())
+ return new TextComponent("&" + color + "&n" + a + "&" + color + ' ').setHover("show_text", "Click to open " + a.trim().replace(/^(?:[&§][0-9a-fmn])+|(?:[&§][0-9a-fmn])+$/g, "")).setClick("open_url", a.trim().replace(/[&§][0-9a-fmn]/g, ""))
} else {
return new TextComponent(a + ' ')
}