window.location.pathname seriously sucks