aboutsummaryrefslogtreecommitdiff
path: root/src/utils/utils.js
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-09-23 14:47:25 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-09-23 14:47:25 +0800
commit644a192508dba2719c24ecd3c0b3295120b0fbb5 (patch)
tree9060d0ce9431a13789a9e0fc4852b6b0d0faeaff /src/utils/utils.js
parent98c4fe9410c9144c26f389cf5290574f778d7967 (diff)
downloadSoopyV2-644a192508dba2719c24ecd3c0b3295120b0fbb5.tar.gz
SoopyV2-644a192508dba2719c24ecd3c0b3295120b0fbb5.tar.bz2
SoopyV2-644a192508dba2719c24ecd3c0b3295120b0fbb5.zip
+ meta
+ actually fix link clicking in g chat
Diffstat (limited to 'src/utils/utils.js')
-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 015643d..9183d7e 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().replace(/[&§][0-9a-fmn]/g, ""))
+ return new TextComponent("&" + color + "&n" + a + "&" + color + ' ').setHover("show_text", "Click to open " + a.trim().replace(/^(?:[&§][0-9a-fmn])+|(?:[&§][0-9a-fmnr])+$/g, "")).setClick("open_url", a.trim().replace(/[&§][0-9a-fmnr]/g, ""))
} else {
return new TextComponent(a + ' ')
}