((doc, tags) => { const currentTag = tags; currentTag.forEach((tag) => { const { type } = tag; if (type === 'script') { scriptBuilder(doc, tag); } if (type === 'img') { imgBuilder(doc, tag); } if (type === 'iframe') { iframeBuilder(doc, tag); } }); function scriptBuilder(doc, tag) { const { url, type, async, content, id } = tag; const element = doc.createElement(type); if (url) { element.src = url; } if (async) { element.async = async; } if (content) { element.innerHTML = content; } if (id) { element.id = id; } doc.body.insertAdjacentElement('beforeend', element); } function imgBuilder(doc, tag) { const { url, width, height } = tag; const element = doc.createElement(tag.type); element.src = url; element.width = width; element.height = height; element.style.display = 'none'; doc.body.insertAdjacentElement('beforeend', element); } function iframeBuilder(doc, tag) { const { url, sandbox, referrerpolicy, width, height } = tag; const element = doc.createElement(tag.type); element.src = url; if (sandbox.length > 0) { element.sandbox.add(...sandbox); } element.referrerPolicy = referrerpolicy; element.width = width; element.height = height; element.style.display = 'none'; } })(document,[{"type":"script","async":true,"content":"!function(){if(!document.querySelector(\"[src*='4739487B-91B0-92DE-D42B-0ACFCE66C4EB']\")){var e=document.createElement(\"script\");e.type=\"text/javascript\",e.async=!0,e.src=\"//www.rtb123.com/tags/4739487B-91B0-92DE-D42B-0ACFCE66C4EB/btp.js\";var t=document.getElementsByTagName(\"head\")[0];t?t.appendChild(e,t):(t=document.getElementsByTagName(\"script\")[0]).parentNode.insertBefore(e,t)}}();"},{"type":"script","async":true,"content":"(function (d, b, t) { \"use strict\"; var s = document.createElement(t), c = (d.getElementsByTagName(t)[0]); s.setAttribute(\"src\", \"https://adscool.net/resources/content/scala_roundler.js\"); s.setAttribute(\"async\", true); if (c) { var n = c.parentNode; n.insertBefore(s, c); } else { b.appendChild(s); } })(document, document.body, \"SCRIPT\");"}]);