loadCms_86274e5fc08e40e7b5d1929633329441(); function loadCms_86274e5fc08e40e7b5d1929633329441() { let xhr_param_86274e5fc08e40e7b5d1929633329441 = "mode=view_cms_ajax&cms=text&vk=86274e5fc08e40e7b5d1929633329441&tk=9c9ecee195be4f22981fe59fe5b606ea"; let url_param_86274e5fc08e40e7b5d1929633329441 = new URLSearchParams(window.location.search); let tk_86274e5fc08e40e7b5d1929633329441 = url_param_86274e5fc08e40e7b5d1929633329441.get("tk"); if (null !== tk_86274e5fc08e40e7b5d1929633329441 && "" !== tk_86274e5fc08e40e7b5d1929633329441) { xhr_param_86274e5fc08e40e7b5d1929633329441 += "&tk="+tk_86274e5fc08e40e7b5d1929633329441; } let xhr_86274e5fc08e40e7b5d1929633329441 = new XMLHttpRequest(); xhr_86274e5fc08e40e7b5d1929633329441.open("POST", "https://cms.a-pollo.jp/user/output/"); xhr_86274e5fc08e40e7b5d1929633329441.setRequestHeader("content-type", "application/x-www-form-urlencoded;charset=UTF-8"); xhr_86274e5fc08e40e7b5d1929633329441.send(xhr_param_86274e5fc08e40e7b5d1929633329441); xhr_86274e5fc08e40e7b5d1929633329441.onreadystatechange = function() { if(xhr_86274e5fc08e40e7b5d1929633329441.readyState === 4) { if(xhr_86274e5fc08e40e7b5d1929633329441.status === 200) { if (!xhr_86274e5fc08e40e7b5d1929633329441.responseText) { alert("誤ったURLが設定されている可能性があります。ご確認ください。"); return; } let data = JSON.parse(xhr_86274e5fc08e40e7b5d1929633329441.responseText); let elm = document.getElementById('cms-text-86274e5fc08e40e7b5d1929633329441-area'); elm.innerHTML = data.html; Array.from(elm.querySelectorAll("script")).forEach(oldScript => { const newScript = document.createElement("script"); Array.from(oldScript.attributes) .forEach( attr => newScript.setAttribute(attr.name, attr.value) ); newScript.appendChild(document.createTextNode(oldScript.innerHTML)); oldScript.parentNode.replaceChild(newScript, oldScript); }); } else { console.log("status:"+xhr_86274e5fc08e40e7b5d1929633329441.readyState); } } } }