Comment on I wrote hacky tampermonkey script to fix Lemmy instance links. Any advice?
smpl@discuss.tchncs.de 1 year ago
You could check if a domain contains a lemmy instance by fetching /.well-known/nodeinfo
, but it’s bad netiquette to hammer sites with requests and could get users blocked. If you were to do it I’d make sure it cached the lookups in IndexedDB, localStorage or just using Cache API. I’m unsure how well any of the APIs works with UserScripts.