3 ms·
Show HN: D4pi: Show/Share Diablo 4 Item as Text/Link (Alternative to Screenshot)
Frontend newbie here trying to learn by doing :)
Feedback is much appreciated; especially around security, since D4pi takes arbitrary user input text, sanitizes it (by removing & < > " '), transforms it, and then renders it as HTML. I will be very happy to learn about anything I missed or some other way to do it better.
Thank you.
Source code: https://github.com/d4pi/d4pi.github.io https://github.com/d4pi/d4pi.github.io
---
Edit: This may be more interesting to D4 players:
The D4pi item editor lets you to enter item attributes with few keystrokes; for example, all the following entries are recognized and rendered as
+2.5% Critical Strike Chance
The +, %, and space are all optional; abbreviations/acronyms are case-insensitive.
+2.5% CSC
2.5% CSC
2.5 CSC
2.5CSC
2.5csc
And an item can be shared as a link like this - no need to find a host for screenshots: https://d4pi.com/view/#0.2.0.0%26%0AMasked%20Work%0A2%0As%0Ar%0Ah%0A12%0A281%20ip%0A%3D%0A351%20Armor%0A%3D%0A%2B3.3%25%20CSC%0A%2B18%20i%0AWIYPAG%2025%25%20MSf2S%0A%3D%0A5CSD%0A10LRwNDR%0A2.5ta%0A%3D%0ARL%2017%0AS%0A https://d4pi.com/view/#0.2.0.0%26%0AMasked%20Work%0A2%0As%0A...