loadCms_8f4007ee59694d79b907c6ea84686d5c(); function loadCms_8f4007ee59694d79b907c6ea84686d5c() { let xhr_param_8f4007ee59694d79b907c6ea84686d5c = "mode=view_cms_ajax&cms=custom&vk=8f4007ee59694d79b907c6ea84686d5c&cstacsttrk=8b433d25f7f24de3b56e85bab6c12712"; let url_param_8f4007ee59694d79b907c6ea84686d5c = new URLSearchParams(window.location.search); let cstck_8f4007ee59694d79b907c6ea84686d5c = url_param_8f4007ee59694d79b907c6ea84686d5c.get("cstck"); if (null !== cstck_8f4007ee59694d79b907c6ea84686d5c && "" !== cstck_8f4007ee59694d79b907c6ea84686d5c) { xhr_param_8f4007ee59694d79b907c6ea84686d5c += "&cstck="+cstck_8f4007ee59694d79b907c6ea84686d5c; } let cstp_8f4007ee59694d79b907c6ea84686d5c = url_param_8f4007ee59694d79b907c6ea84686d5c.get("cstp[8f4007ee59694d79b907c6ea84686d5c]"); if (null !== cstp_8f4007ee59694d79b907c6ea84686d5c && "" !== cstp_8f4007ee59694d79b907c6ea84686d5c) { xhr_param_8f4007ee59694d79b907c6ea84686d5c += "&cstp="+cstp_8f4007ee59694d79b907c6ea84686d5c; } let xhr_8f4007ee59694d79b907c6ea84686d5c = new XMLHttpRequest(); xhr_8f4007ee59694d79b907c6ea84686d5c.open("POST", "https://cms.a-pollo.jp/user/output/"); xhr_8f4007ee59694d79b907c6ea84686d5c.setRequestHeader("content-type", "application/x-www-form-urlencoded;charset=UTF-8"); xhr_8f4007ee59694d79b907c6ea84686d5c.send(xhr_param_8f4007ee59694d79b907c6ea84686d5c); xhr_8f4007ee59694d79b907c6ea84686d5c.onreadystatechange = function() { if(xhr_8f4007ee59694d79b907c6ea84686d5c.readyState === 4) { if(xhr_8f4007ee59694d79b907c6ea84686d5c.status === 200) { if (!xhr_8f4007ee59694d79b907c6ea84686d5c.responseText) { alert("誤ったURLが設定されている可能性があります。ご確認ください。"); return; } let data = JSON.parse(xhr_8f4007ee59694d79b907c6ea84686d5c.responseText); let elm = document.getElementById('cms-custom-8f4007ee59694d79b907c6ea84686d5c-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_8f4007ee59694d79b907c6ea84686d5c.readyState); } } } } function onCmsCustomPageChange_8f4007ee59694d79b907c6ea84686d5c(page) { const url = new URL(window.location.href); url.searchParams.set('cstp[8f4007ee59694d79b907c6ea84686d5c]', page); window.history.pushState(null, '', url.toString()); loadCms_8f4007ee59694d79b907c6ea84686d5c(); }