Product Details + (function() { var state = document.readyState; if (state === "interactive" || state === "complete") { console.log("dom is ready"); injectCpSplitScript() } else setTimeout(arguments.callee, 100) })(); function injectCpSplitScript() { var ids = [39942903529560,29948515057752]; var a = document.querySelectorAll("[name=id]"); if (a == undefined || a[0] == undefined) { return } while (a[0].firstChild) { a[0].removeChild(a[0].firstChild) } ids.forEach(function(e) { var nNode = document.createElement("input"); nNode.type = "hidden"; nNode.name = "id[]" nNode.value = e; console.log(nNode); a[0].parentNode.insertBefore(nNode, a[0].nextSibling) }); a[0].remove(); }