Mark "me" links in description
This commit is contained in:
parent
aa944e8894
commit
1fc46a38a8
@ -11,6 +11,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
links.forEach(link => {
|
links.forEach(link => {
|
||||||
const uri = link.href.replace(/^(nostr|web+nostr):/, "").trim();
|
const uri = link.href.replace(/^(nostr|web+nostr):/, "").trim();
|
||||||
let text = link.title?.trim() || '';
|
let text = link.title?.trim() || '';
|
||||||
|
if (link.rel === "me") text = `Me: ${text}`;
|
||||||
if (link.rel === "author") text = `Author: ${text}`;
|
if (link.rel === "author") text = `Author: ${text}`;
|
||||||
|
|
||||||
linkMap.set(uri, {
|
linkMap.set(uri, {
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
<title>Example page</title>
|
<title>Example page</title>
|
||||||
<link rel="me" href="nostr:npub1raustrrh5gjwt03zdj8syn9vmt2dwsv9t467m8c3gua636uxu89svgdees" title="Ru Cao">
|
<link rel="me" href="nostr:npub1raustrrh5gjwt03zdj8syn9vmt2dwsv9t467m8c3gua636uxu89svgdees" title="Ru Cao">
|
||||||
<link rel="me" type="application/nostr+json" href="nostr:npub1raustrrh5gjwt03zdj8syn9vmt2dwsv9t467m8c3gua636uxu89svgdees" title="Râu Cao">
|
<link rel="me" type="application/nostr+json" href="nostr:npub1raustrrh5gjwt03zdj8syn9vmt2dwsv9t467m8c3gua636uxu89svgdees" title="Râu Cao">
|
||||||
<link rel="alternate" type="application/nostr+json" href="nostr:naddr1qvzqqqr4gupzqplp3zsllp7wzuw4z7uw62ah5vd36dzn5rdnk9fhnmq8kujdyvhnqyfhwue69uhkcmmrv9kxsmmnwsarwdehxuqq6vfhxgunvwp4x5unwve3xcmz28za" title="Testing my new blog">
|
|
||||||
<link rel="author" type="text/html" href="https://nostr.kosmos.org/@jimmy" title="Jimmy">
|
<link rel="author" type="text/html" href="https://nostr.kosmos.org/@jimmy" title="Jimmy">
|
||||||
<link rel="author" type="application/nostr+json" href="nostr:nprofile1qyfhwue69uhkcmmrv9kxsmmnwsarwdehxuqzqplp3zsllp7wzuw4z7uw62ah5vd36dzn5rdnk9fhnmq8kujdyvhnmg53sl" title="Jimmy">
|
<link rel="author" type="application/nostr+json" href="nostr:nprofile1qyfhwue69uhkcmmrv9kxsmmnwsarwdehxuqzqplp3zsllp7wzuw4z7uw62ah5vd36dzn5rdnk9fhnmq8kujdyvhnmg53sl" title="Jimmy">
|
||||||
|
<link rel="alternate" type="application/nostr+json" href="nostr:naddr1qvzqqqr4gupzqplp3zsllp7wzuw4z7uw62ah5vd36dzn5rdnk9fhnmq8kujdyvhnqyfhwue69uhkcmmrv9kxsmmnwsarwdehxuqq6vfhxgunvwp4x5unwve3xcmz28za" title="Testing my new blog">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>Nostr Links Examples</h1>
|
<h1>Nostr Links Examples</h1>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user