'); var newContent = document.createElement('base'); var docLocation = document.location; newContent.href = docLocation.pathname.replace('index.html', ''); var scriptSrc = document.getElementById('appPath'); scriptSrc.parentNode.insertBefore(newContent, scriptSrc);