javascript get last part of url without query string