Useage of window.location.pathname

So that subdir installations also work