var contentText = '' + 'Blackstone Motors' + ''; var contentDiv = document.createElement('div'); contentDiv.innerHTML = contentText; var scripts = document.getElementsByTagName('script'); var currentScriptTag = scripts[scripts.length - 1]; currentScriptTag.parentNode.insertBefore(contentDiv, currentScriptTag.nextSibling);