From 644a192508dba2719c24ecd3c0b3295120b0fbb5 Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Fri, 23 Sep 2022 14:47:25 +0800 Subject: + meta + actually fix link clicking in g chat --- src/metadata.json | 4 ++-- src/utils/utils.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/metadata.json b/src/metadata.json index ca11756..766ec9b 100644 --- a/src/metadata.json +++ b/src/metadata.json @@ -5,8 +5,8 @@ "entry": "index.js", "description": "SoopyV2", "name": "SoopyV2", - "version": "2.1.165", - "versionId": 292, + "version": "2.1.166", + "versionId": 293, "requires": [ "soopyApis", "soopyAddonsData", 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 + ' ') } -- cgit