var x = document.getElementsByTagName("script"); var tally = 0; var str = 'https://xmware.com/cryptoquote/'; for (let i = 0;i < x.length; i++) if (x[i].src.startsWith(str)) { var newNode = document.createElement("link"); newNode.rel = "stylesheet"; newNode.href = 'https://xmware.com/cryptoquote/bb.css'; x[i].parentNode.appendChild(newNode); //alert(x[i].parentNode.innerH); var newNode = document.createElement("div"); newNode.innerHTML = '
'; x[i].parentNode.appendChild(newNode); var newNode = document.createElement("div"); newNode.innerHTML = '
default
'; x[i].parentNode.appendChild(newNode); //mainblock = x[i]; } var newNode = document.createElement("script"); newNode.setAttribute("src","https://www.xmware.com/cryptoquote/cryptoquote.js?10"); newNode.setAttribute("type", "text/javascript"); document.body.appendChild(newNode);