Use `location.pathname`.split( "/" );` instead