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.
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.