I know I can use window.location.pathname to return a url, but how do I parse the url?
I have a url like this: http://localhost/messages/mine/9889 and I\'m trying to
if (window.location.pathname.split("/")[2] == "mine") { // it exists };
window.location.pathname is a string at the end of the day, so the usual string methods apply.