A friendly time-since label with native JavaScript
Format a timestamp as a readable relative-time label, with explicit UTC dates and honest approximate months and years.
Open Code ByteGet a visitor's approximate country with Cloudflare Workers
Read Cloudflare's country metadata at the edge without exposing the visitor's IP address or setting a tracking cookie.
Open Code ByteUpdate a footer year without document.write
Keep a footer year current using a small JavaScript enhancement or a server-rendered PHP date, with a readable fallback.
Open Code ByteHighlight the current navigation link with JavaScript
Match same-site navigation paths with native JavaScript and mark the current page with an active class and aria-current.
Open Code ByteAnimate a progress display without inventing progress
Give a known percentage a small visual entrance, keep its value accessible and distinguish a demonstration from real upload or task progress.
Open Code ByteKeep Google Maps from hijacking page scrolling
Configure cooperative gestures in the Google Maps JavaScript API instead of guessing touch devices from screen width.
Open Code ByteCount up from a date with JavaScript
Display elapsed days, hours, minutes and seconds from an explicit timestamp, with independent timer state, pause/resume and cleanup.
Open Code ByteFind duplicate values with a JavaScript Map
Count exact duplicate IDs in one pass, preserve meaningful leading zeroes and show a readable result without constructing selectors from input.
Open Code ByteValidate a numeric input without blocking typing
Let people type, paste and edit normally, then validate a clearly defined decimal format with accessible feedback and server-side checks.
Open Code Byte