home · contact · privacy
In web client, get rid of matchAll, unsupported in older browsers.
[plomrogue2] / rogue_chat.html
index c685581b91969031a0f217feca967bc9c4464aac..b9673a1320b1ad3eac182cefae95004690989413 100644 (file)
@@ -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;