home
·
contact
·
privacy
projects
/
plomrogue2
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d1f606
)
In web client, get rid of matchAll, unsupported in older browsers.
author
Christian Heller
<c.heller@plomlompom.de>
Wed, 16 Dec 2020 15:29:46 +0000
(16:29 +0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Wed, 16 Dec 2020 15:29:46 +0000
(16:29 +0100)
rogue_chat.html
patch
|
blob
|
history
diff --git
a/rogue_chat.html
b/rogue_chat.html
index c685581b91969031a0f217feca967bc9c4464aac..b9673a1320b1ad3eac182cefae95004690989413 100644
(file)
--- a/
rogue_chat.html
+++ b/
rogue_chat.html
@@
-986,10
+986,11
@@
let tui = {
};
inner_links[y].push([url_start_x, end_x, url]);
};
- const matches = msg.matchAll(/https?:\/\/[^\s]+/g)
let link_data = {};
let url_ends = [];
- for (const match of matches) {
+ const regexp = RegExp('https?://[^\\s]+', 'g');
+ let match;
+ while ((match = regexp.exec(msg)) !== null) {
const url = match[0];
const url_start = match.index;
const url_end = match.index + match[0].length;