diff --git a/content.js b/content.js index 1e7901b..ca10a7b 100644 --- a/content.js +++ b/content.js @@ -1,8 +1,11 @@ document.addEventListener('DOMContentLoaded', function() { - const linkRels = ['alternate', 'me', 'author']; - const selector = linkRels.map(rel => `link[rel="${rel}"][type="application/nostr+json"]`).join(','); - const links = document.querySelectorAll(selector); - const linkMap = new Map(); + const linkRels = ['alternate', 'me', 'author']; + const selectorUntyped = linkRels.map(rel => `link[rel="${rel}"][href^="nostr:"]`).join(','); + const selectorTyped = linkRels.map(rel => `link[rel="${rel}"][type="application/nostr+json"]`).join(','); + const untypedLinks = document.querySelectorAll(selectorUntyped); + const typedLinks = document.querySelectorAll(selectorTyped); + const links = [...untypedLinks, ...typedLinks] + const linkMap = new Map(); if (links.length > 0) { links.forEach(link => {