Triptych 🌱 on Nostr: I found a cool way to list in order all the links in a page using Object.groupBy --> ...
I found a cool way to list in order all the links in a page using Object.groupBy --> `Object.groupBy(document.getElementsByTagName('a'), (tag) => tag.href)` #javascript
Published at
2024-05-20 16:26:17Event JSON
{
"id": "715fd7ef5116363d8b87d724395ac05e7c0997173938b3422febcad2731b227f",
"pubkey": "8fa862f1cc473f9a4e87c7991b3a7fafdefcb503fa5ad62d6d326997b84af15e",
"created_at": 1716222377,
"kind": 1,
"tags": [
[
"proxy",
"https://social.lol/@triptych/112474349746534169",
"web"
],
[
"t",
"javascript"
],
[
"proxy",
"https://social.lol/users/triptych/statuses/112474349746534169",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://social.lol/users/triptych/statuses/112474349746534169",
"pink.momostr"
]
],
"content": "I found a cool way to list in order all the links in a page using Object.groupBy --\u003e `Object.groupBy(document.getElementsByTagName('a'), (tag) =\u003e tag.href)` #javascript",
"sig": "9c4aa3d68365a54b14681605c08313cde3e5d979fcb594a199b94088d99a00548662c279034dd35d2ea0f8a7376223af8483e0ec3bb734cf71caf04c9686f3e7"
}