function bluring() { try{ if(event.srcElement.tagName=='A'||event.srcElement.tagName=='IMG') { document.body.focus(); } }catch( e ) { } } try{ document.onfocusin=bluring; }catch( e ) { } var rurl = location.href; var purl = getUrl(rurl); function getUrl(url_str) { var real_url; if (url_str.indexOf('/') > 0) { real_url = url_str.split('/'); real_url = real_url[0]+'//'+real_url[2]+'/'+real_url[3]+'/'; } return real_url; } function goLocate(go_url) { document.location = purl + go_url; } function console_test() { console.log("test"); alert("¾Ë¸²test"); } async function sendSMS() { const res = await fetch("https://sms.grangde.kr/api/send-sms", { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ rphone: "010-4196-3072", msg: "»ó´ã°Ô½ÃÆÇ¿¡ ¹®ÀDZÛÀÌ ÀÛ¼ºµÇ¾ú½À´Ï´Ù.", smsType: "S" }) }); const data = await res.json(); if (data.result === "success") console.log("¹ß¼Û¼º°ø"); else alert("¿À·ù: " + (data.raw || data.error)); } document.addEventListener("DOMContentLoaded", function () { const targetInput = document.querySelector( "#container_write form[name='com_board'] #cafe_bbs_write_table #write_btn_table tbody tr td:nth-child(2) input" ); const titleEl = document.querySelector('.title-wrap > h2'); if (titleEl && titleEl.textContent.includes("»ó´ã")) { if(targetInput) { targetInput.addEventListener("click", function () { sendSMS(); }); } } });