loadCms_4bf3108afd574dfca85855a02a7ee406(); function loadCms_4bf3108afd574dfca85855a02a7ee406() { let xhr_param_4bf3108afd574dfca85855a02a7ee406 = "mode=view_cms_ajax&cms=blog&vk=4bf3108afd574dfca85855a02a7ee406&babtrk=a2ab04b6d09640cb93a7922fc1dbdeff"; let url_param_4bf3108afd574dfca85855a02a7ee406 = new URLSearchParams(window.location.search); let slug_4bf3108afd574dfca85855a02a7ee406 = url_param_4bf3108afd574dfca85855a02a7ee406.get("slug"); if (null !== slug_4bf3108afd574dfca85855a02a7ee406 && "" !== slug_4bf3108afd574dfca85855a02a7ee406) { xhr_param_4bf3108afd574dfca85855a02a7ee406 += "&slug="+slug_4bf3108afd574dfca85855a02a7ee406; } let bck_4bf3108afd574dfca85855a02a7ee406 = url_param_4bf3108afd574dfca85855a02a7ee406.get("bck"); if (null !== bck_4bf3108afd574dfca85855a02a7ee406 && "" !== bck_4bf3108afd574dfca85855a02a7ee406) { xhr_param_4bf3108afd574dfca85855a02a7ee406 += "&bck="+bck_4bf3108afd574dfca85855a02a7ee406; } let bp_4bf3108afd574dfca85855a02a7ee406 = url_param_4bf3108afd574dfca85855a02a7ee406.get("bp[4bf3108afd574dfca85855a02a7ee406]"); if (null !== bp_4bf3108afd574dfca85855a02a7ee406 && "" !== bp_4bf3108afd574dfca85855a02a7ee406) { xhr_param_4bf3108afd574dfca85855a02a7ee406 += "&bp="+bp_4bf3108afd574dfca85855a02a7ee406; } let xhr_4bf3108afd574dfca85855a02a7ee406 = new XMLHttpRequest(); xhr_4bf3108afd574dfca85855a02a7ee406.open("POST", "https://cms.a-pollo.jp/user/output/"); xhr_4bf3108afd574dfca85855a02a7ee406.setRequestHeader("content-type", "application/x-www-form-urlencoded;charset=UTF-8"); xhr_4bf3108afd574dfca85855a02a7ee406.send(xhr_param_4bf3108afd574dfca85855a02a7ee406); xhr_4bf3108afd574dfca85855a02a7ee406.onreadystatechange = function() { if(xhr_4bf3108afd574dfca85855a02a7ee406.readyState === 4) { if(xhr_4bf3108afd574dfca85855a02a7ee406.status === 200) { if (!xhr_4bf3108afd574dfca85855a02a7ee406.responseText) { alert("誤ったURLが設定されている可能性があります。ご確認ください。"); return; } let data = JSON.parse(xhr_4bf3108afd574dfca85855a02a7ee406.responseText); let elm = document.getElementById('cms-blog-4bf3108afd574dfca85855a02a7ee406-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_4bf3108afd574dfca85855a02a7ee406.readyState); } } } } function onCmsBlogPageChange_4bf3108afd574dfca85855a02a7ee406(page) { const url = new URL(window.location.href); url.searchParams.set('bp[4bf3108afd574dfca85855a02a7ee406]', page); window.history.pushState(null, '', url.toString()); loadCms_4bf3108afd574dfca85855a02a7ee406(); }