Experimental browser for the Atmosphere
(() => {let entries = Object.entries(Array.from(document.querySelectorAll("*")).reduce((acc,el) => {acc[el.tagName] = (acc[el.tagName] || 0) + 1; return acc},{})); entries.sort((a,b) => b[1] - a[1]); console.log(entries) })() Counts all elements by tagname. Most modern sites do poorly #javascript
May 8, 2025, 6:48 PM
{ "uri": "at://did:plc:ph6pc7d7pwkilsmq6ev44lp4/app.bsky.feed.post/3lool7f6lfk2d", "cid": "bafyreif2qipoh2nraeztsgzomqkyhkkuh4s64u2n2ixa4sojlty7wzvaaa", "value": { "text": "(() => {let entries = Object.entries(Array.from(document.querySelectorAll(\"*\")).reduce((acc,el) => {acc[el.tagName] = (acc[el.tagName] || 0) + 1; return acc},{})); entries.sort((a,b) => b[1] - a[1]); console.log(entries) })()\n\nCounts all elements by tagname.\n\nMost modern sites do poorly\n\n#javascript", "$type": "app.bsky.feed.post", "embed": { "$type": "app.bsky.embed.recordWithMedia", "media": { "$type": "app.bsky.embed.images", "images": [ { "alt": "A list of html elements and their count - 11.000 divs in that example. Buttons and image are used.", "image": { "$type": "blob", "ref": { "$link": "bafkreidmhi7f7ww3zjvzyjtkkezqlt2vysppn3uuqg5blduk22fjoxd3ei" }, "mimeType": "image/jpeg", "size": 213622 }, "aspectRatio": { "width": 740, "height": 726 } } ] }, "record": { "$type": "app.bsky.embed.record", "record": { "cid": "bafyreihmelkcvw56ea4upoxrz6644gen5h4jh5tswby4njvo6vki6lwg34", "uri": "at://did:plc:7rshf3wikytqdsw4fw243xnz/app.bsky.feed.post/3lomdmfhdfc27" } } }, "langs": [ "en" ], "facets": [ { "index": { "byteEnd": 300, "byteStart": 289 }, "features": [ { "tag": "javascript", "$type": "app.bsky.richtext.facet#tag" } ] } ], "createdAt": "2025-05-08T18:48:12.741Z" } }