small javascript url router