Merge pull request #1084 from Armored-Dragon/fix/Tofu-inArmored-Chat

[Armored Chat] Change the 'open in new window' character.
This commit is contained in:
Julian Groß 2024-09-02 13:17:24 +02:00 committed by GitHub
commit 433e2c0234
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -514,7 +514,7 @@ Rectangle {
mess = mess.replace(arrow, "<");
var link = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/g;
mess = mess.replace(link, (match) => {return `<a style="color:#4EBAFD" onclick='Window.openUrl("+match+")' href='` + match + `'>` + match + `</a> <a onclick='Window.openUrl(`+match+`)'></a>`});
mess = mess.replace(link, (match) => {return `<a style="color:#4EBAFD" onclick='Window.openUrl("+match+")' href='` + match + `'>` + match + `</a> <a onclick='Window.openUrl(`+match+`)'>🗗</a>`});
var newline = /\n/gi;
mess = mess.replace(newline, "<br>");