pure javascript get project path code example Example: js get base url var url = window.location.origin;