Show HN: A complete guide how to segment a URL with JavaScript