7

In chat if someone mentions a sub and we want to look at it we have to copy it and type
h t t p s : / / p h u k s . c o ctrl-v

Or the js that drives the chat could just identify it and have a target="_blank" link to it.

One way is with a regex.

text.replace(/(\/s\/\S+)/g,(v)=>{return `<a href="${v}">${v}</a>`;});
In chat if someone mentions a sub and we want to look at it we have to copy it and type h t t p s : / / p h u k s . c o ctrl-v Or the js that drives the chat could just identify it and have a target="_blank" link to it. One way is with a regex. ``` text.replace(/(\/s\/\S+)/g,(v)=>{return `<a href="${v}">${v}</a>`;}); ```

No comments, yet...