1 2function board_btn_share(sns) { 3 if (!Kakao.isInitialized()) { 4 Kakao.init('99ac657f5b16f033957c8872984f083c'); 5 //ì¹´ì¹´ì¤ ê³µì í기 í¤ ê° 6 } 7 8 const urlParams = new URL(location.href).searchParams; 9 10 let url = ""; 11 let act = urlParams.get("act"); 12 let bid = urlParams.get("bid"); 13 let list_no = urlParams.get("list_no"); 14 let title = ""; 15 let thumNail = ""; 16 17 18 19 //ìë£ê´ì¥ ê²ì물 ì ë³´ ê°ì ¸ì¤ê¸° (ìì¸íì´ì§ ì¼ë) 20 let maincategory = urlParams.get("maincategory"); 21 let subcategory = urlParams.get("subcategory"); 22 let data_id = urlParams.get("data_id"); 23 24 25 if (act == "view") { 26 //ìì¸ë³´ê¸° 27 } else { 28 //리ì¤í¸ 29 if (data_id) { 30 //ìë£ê´ì¥ ì¶í dbì ì ì¥íê² ëë¤ë©´ ì¬ê¸°ì ìì 31 } else { 32 //ì¼ë° ê²ìê¸ ë¦¬ì¤í¸ ì¼ë 33 bid = document.querySelector(".modal_share_bid").value; 34 list_no = document.querySelector(".modal_share_list_no").value; 35 } 36 } 37 38 //기본 ë©íë°ì´í°ì ì ì¥ë ì ë³´ë¤ 39 let thumbImg = $('meta[property="og:image"]').attr('content'); //ogì´ë¯¸ì§ 주ì 40 let thumbTitle = $('meta[property="og:title"]').attr('content'); //ogíì´í 41 //let thumbDesc = $('meta[property="og:description"]').attr('content'); //ogì¤ëª 42 //let linkUrl = $('meta[property="og:url"]').attr('content'); //url 43 44 //모ë¬ì ì ë¬ë ê° ê°ì ¸ì¤ê¸° 45 title = document.querySelector(".modal_share_title").value == '' ? thumbTitle : document.querySelector(".modal_share_title").value; 46 url = document.querySelector(".modal_share_url").value; 47 48 //ê³µì í기 ì íì ì¬ì´ì¦ ì¡°ì 49 let popupSize = "width=500,height=600" 50 51 if (sns == "facebook") { 52 window.open("http://www.facebook.com/sharer/sharer.php?u=" + encodeURIComponent(url) + "&text=" + encodeURIComponent(), "", popupSize); 53 } 54 if (sns == "twitter") { 55 window.open("http://twitter.com/share?url=" + encodeURIComponent(url), "", popupSize); 56 } 57 58 if (sns == "kakao") { 59 //ê²ì물 ì¸ë¤ì¼ ì¶ê° 60 thumNail = `https://munjang.or.kr/boardImgView.es?bid=${bid}&list_no=${list_no}`; 61 Kakao.Link.sendDefault({ 62 objectType: "feed", 63 content: { 64 title, 65 imageUrl: thumNail, 66 link: { 67 mobileWebUrl: document.querySelector(".modal_share_url").value, 68 webUrl: document.querySelector(".modal_share_url").value, 69 }, 70 }, 71 social: { 72 }, 73 buttons: [ 74 { 75 title: "ì¹ì¼ë¡ 보기", 76 link: { 77 mobileWebUrl: document.querySelector(".modal_share_url").value, 78 webUrl: document.querySelector(".modal_share_url").value, 79 }, 80 }, 81 { 82 title: "ì±ì¼ë¡ 보기", 83 link: { 84 mobileWebUrl: document.querySelector(".modal_share_url").value, 85 webUrl: document.querySelector(".modal_share_url").value, 86 }, 87 }, 88 ], 89 }); 90 } 91 92 93 //ìë£ê´ì¥ììë ì ë°ì´í¸ x 94 if (!data_id || maincategory == "90") { 95 $.ajax({ 96 type: "GET", 97 url: "/sharesns", 98 data: { 99 bid, 100 list_no, 101 data_id, 102 maincategory, 103 subcategory, 104 }, 105 success: function(response) { 106 document.querySelector("#modal_share").style.display = "none"; 107 document.querySelector("#modal_share").classList.remove(".opened_layer"); 108 109 //GTE ê²ìíì© 110 let GteNumCount = document.querySelectorAll(".thumb_hover"); 111 if (GteNumCount) { 112 GteNumCount.forEach((el) => { 113 if (el.classList.contains(list_no)) { 114 el.querySelector(".shareNum span").innerText = response.shareCount; 115 } 116 }); 117 } 118 119 let dbNumCount = document.querySelectorAll(".share"); 120 if (dbNumCount) { 121 dbNumCount.forEach((el) => { 122 el.lastChild.innerText = response.shareCount; 123 }); 124 } 125 }, 126 error: function(error) { }, 127 }); 128 } 129}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.