Comment on I wrote hacky tampermonkey script to fix Lemmy instance links. Any advice?

<- View Parent
ezchili@iusearchlinux.fyi ⁨1⁩ ⁨year⁩ ago

Never use regex on URLs, make a list of hostnames and use the browser’s URL api to extract hostnames then match against the list

source
Sort:hotnewtop