-
sanitize-html
Clean up user-submitted HTML, preserving whitelisted elements and whitelisted attributes on a per-element basis. Built on htmlparser2 for speed and tolerance
-
Scout Monitoring
Rennaisance engineers rejoice! 1 gem 5 min to app monitoring. 5-minute onboarding. No sales team. Devs in the support channels. No DevOps team required. Get the free app insights every engineer deserves with Scout Monitoring.
One thing to watch out for is that the content of each reply is HTML. To be safe (paranoid), I'm running the HTML through sanitize-html to make sure nobody can inject sketchy HTML into my site.
async function getMentions(url) { let mentions = []; let page = 0; let perPage = 100; while (true) { const results = await fetch( `https://webmention.io/api/mentions.jf2?target=${url}&per-page=${perPage}&page=${page}` ).then((r) => r.json()); mentions = mentions.concat(results.children); if (results.children.length < perPage) { break; } page++; } return mentions.sort((a, b) => ((a.published || a['wm-received']) < (b.published || b['wm-received']) ? -1 : 1)); }
Go to fed.brid.gy and, if you're like me, you'll want to click on "Cross-post to a Mastodon account", so that it'll integrate with your existing Mastodon account.
For any posts that don't have any mentions, I added a different button, "Share this on Mastodon". When you click it, it runs this code, which prompts you for your Mastodon server (inspired by Advent of Code's share functionality):
Related posts
-
Cloud Security and Resilience: DevSecOps Tools and Practices
-
A Deep Dive Into Terraform Static Code Analysis Tools: Features and Comparisons
-
SQLite virtual table to query operating system data via SQL
-
Show HN: Natural Language to SQL "Text-to-SQL" API by Dataherald
-
Best Hacking Tools for Beginners 2024