How to Get Path from URL in Javascript