1//MOBILE MENU 2jQuery("header .nav .nav-icon").click(function() { 3 jQuery(this).toggleClass("active"); 4 jQuery("header .navbar").toggleClass("active"); 5 jQuery("html, body").toggleClass("hidden"); 6}); 7jQuery(document).on("click",".nav .navbar.active>li.menu-item-has-children > a", function() { 8 jQuery(this).removeAttr('href'); 9 var is_display = jQuery(this).next(".sub-menu").css("display"); 10 if (is_display == "block") { 11 jQuery(this).next(".sub-menu").stop().slideUp(); 12 jQuery(this).parent('li').removeClass('active'); 13 } else { 14 jQuery(".sub-menu").stop().slideUp(); 15 jQuery(this).next(".sub-menu").stop().slideDown(); 16 jQuery(".nav .navbar.active>li.menu-item-has-children").removeClass('active'); 17 jQuery(this).parent('li').addClass('active'); 18 } 19 return false; 20}); 21 22//íì 23// function layer_open(no) { 24// jQuery(".pop_wrap").fadeIn(); 25// $(".pop_wrap .pop[layer=" + no + "]").fadeIn(); 26// jQuery("body, html").addClass("on"); 27// }; 28// function layer_close() { 29// jQuery(".pop_wrap, .pop_wrap .pop").fadeOut(); 30// jQuery("body, html").removeClass("on"); 31// }; 32// 33// //í´ë¹ ë²í¼ í´ë¦ì í´ë¹ ë ì´ì´íì í¸ì¶ 34// jQuery(".open_pop").click(function() { 35// var no = jQuery(this).attr("layer"); 36// layer_open(no); 37// jQuery("body, html").addClass("on"); 38// }); 39// jQuery(".pop .close").click(function() { 40// layer_close(); 41// }); 42 43//Top ë²í¼ 44jQuery('.to-top').click(function() { 45 jQuery('html, body').animate({ 46 scrollTop: 0 47 }, 400); 48 return false; 49}); 50 51jQuery("textarea").change(function(){ 52 var current_val = jQuery(this).val(); 53 54 current_val = current_val.replace(/</g, "<").replace(/>/g, ">"); 55 current_val = current_val.replace(/'/g, """).replace(/"/g, '''); 56 current_val = current_val.replace(/(<([^>]+)>)/ig,""); 57 jQuery(this).val(current_val); 58}); 59 60//ê²ìí ê²ì 61jQuery("#keyword").keydown(function(key) { 62 if (key.keyCode == 13) { 63 jQuery('#keyword_btn').trigger('click'); 64 } 65}); 66jQuery("#keyword_btn").click(function(){ 67 if(document.location.hash && document.location.hash != "#1") { 68 document.location.hash = "#1"; 69 } 70 jQuery(this).parents('form').submit(); 71}); 72 73//xss ë°©ì§ 74jQuery('input[type=text],input[type=tel], textarea').on("propertychange change keyup paste input", function() { 75 var current_value = jQuery(this).val(); 76 current_value = current_value.replace(/</gi, ''); 77 current_value = current_value.replace(/>/gi, ''); 78 current_value = current_value.replace('\'', ''); 79 current_value = current_value.replace('"', ''); 80 jQuery(this).val(current_value); 81}); 82 83// get íë¦¬ë¯¸í° ê°ì ¸ì¤ê¸° 84function getUrlParam(name) { 85 86 // íê¸ íë¦¬ë¯¸í° ì¸ì½ë© 87 var search = unescape(encodeURIComponent(location.search)); 88 search = decodeURIComponent(search); 89 90 var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); 91 var r = search.substr(1).match(reg); 92 if (r != null) return unescape(r[2]); return null; 93} 94 95var isEmpty = function(value){ 96 if( value == "false" || value == 0 || value == "" || value == null || value == undefined || ( value != null && typeof value == "object" && !Object.keys(value).length ) ){ 97 return true 98 }else{ 99 return false 100 } 101}; 102 103// ë°°ì´ ë´ ëª¨ë ê° ë³ê²½ 104function updateArray(myArray, oldValue, newValue) { 105 if (!myArray instanceof Array) return; 106 myArray.forEach(function() { 107 const index = myArray.indexOf(oldValue); 108 if (index !== -1) myArray[index] = newValue; 109 }); 110} 111 112function deleteArray(myArray, value) { 113 if (!myArray instanceof Array) return; 114 // myArray.forEach(function(element, index, array) { // íë¼ë¯¸í° : íì¬ìì´í , ì¸ë±ì¤, ë°°ì´ 115 // if(element==value) myArray.splice(index, 1); 116 // }); 117 for(var i = 0; i < myArray.length; i++){ 118 if (myArray[i] === value) { 119 myArray.splice(i, 1); 120 i--; //forEach를 ìì°ê³ for를 ì°ë©´ì i--;를 íë ì´ì ë ë°°ì´ ìì í 길ì´ê° -1ì´ ë기 ë문 121 } 122 } 123} 124 125//ì¢ìì ë²í¼ 126// jQuery(document).on("click", ".btn_like", function(event) { 127// jQuery(this).addClass("on") 128// });
129// jQuery(document).on("click", ".btn_like.on", function(event) { 130// jQuery(this).removeClass("on") 131// }); 132 133//ê´ì¬ë§¤ì¥ ë²í¼ 134// jQuery(document).on("click", ".bookmark", function(event) { 135// jQuery(this).addClass("on") 136// }); 137// jQuery(document).on("click", ".bookmark.on", function(event) { 138// jQuery(this).removeClass("on") 139// }); 140 141 142// ì´ë©ì¼ íì ì²´í¬ 143function check_email(user_email) {                         144   var reg = /^([0-9a-zA-Z_\.-]+)@([0-9a-zA-Z_-]+)(\.[0-9a-zA-Z_-]+){1,2}$/; 145   if(!reg.test(user_email)) {               146     return false;     147   } else {            148     return true;     149   }               150} 151 152// ë¹ë°ë²í¸ì²´í¬ 8~20 ëì문ì,ì«ì,í¹ì문ì 153function check_password(user_password) { 154 var reg = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,20}$/; 155 if(!reg.test(user_password)) { 156 return false; // ë¶ì ì í ì¡°í© 157 } else { 158 return true; 159 } 160} 161 162// í´ëí°ë²í¸ ì²´í¬ 163function check_phone_cell(user_phone_cell) { 164 // var reg = /^01([0|1|6|7|8|9])-?([0-9]{3,4})-?([0-9]{4})$/; // "-"ê° ìë ìë 무ì 165 var reg = /^010-?([0-9]{4})-?([0-9]{4})$/; // "-"ê° ìë ìë 무ì 166 if (!reg.test(user_phone_cell)) { 167 return false; // ë¶ì ì í ì¡°í© 168 } else { 169 return true; 170 } 171} 172 173// ì¸ì¦ë²í¸ ì²´í¬ 174function check_phone_cell_auth_number(user_phone_cell_auth_number) { 175 // var reg = /^01([0|1|6|7|8|9])-?([0-9]{3,4})-?([0-9]{4})$/; // "-"ê° ìë ìë 무ì 176 var reg = /^([0-9]{6})$/; // "-"ê° ìë ìë 무ì 177 if (!reg.test(user_phone_cell_auth_number)) { 178 return false; // ë¶ì ì í ì¡°í© 179 } else { 180 return true; 181 } 182} 183 184function replace_phone_cell(phone) { // ëë²ì§¸ íì´íì´ íìëì§ ìì 185 if(phone) return phone.replace(/^(\d{0,3})(\d{0,4})(\d{0,4})$/g, "$1-$2-$3").replace(/\-{1,2}$/g, ""); // xxx-xxxx-xxxx 186 // if(phone) return phone.replace(/^(\d{0,2})(\d{0,3})(\d{0,4})$/g, "$1-$2-$3").replace(/\-{1,2}$/g, ""); // xx-xxxx-xxxx 187 // return false; 188} 189 190function replace_phone(value) { 191 if (!value) { 192 return ""; 193 } 194 195 value = value.replace(/[^0-9]/g, ""); 196 197 let result = []; 198 let restNumber = ""; 199 200 // ì§ìë²í¸ì ëë¨¸ì§ ë²í¸ë¡ ëë기 201 if (value.startsWith("02")) { 202 // ìì¸ 02 ì§ìë²í¸ 203 result.push(value.substr(0, 2)); 204 restNumber = value.substring(2); 205 } else if (value.startsWith("1")) { 206 // ì§ì ë²í¸ê° ìë ê²½ì° 207 // 1xxx-yyyy 208 restNumber = value; 209 } else { 210 // ëë¨¸ì§ 3ì리 ì§ìë²í¸ 211 // 0xx-yyyy-zzzz 212 result.push(value.substr(0, 3)); 213 restNumber = value.substring(3); 214 } 215 216 if (restNumber.length === 7) { 217 // 7ìë¦¬ë§ ë¨ìì ëë xxx-yyyy 218 result.push(restNumber.substring(0, 3)); 219 result.push(restNumber.substring(3)); 220 } else { 221 result.push(restNumber.substring(0, 4)); 222 result.push(restNumber.substring(4)); 223 } 224 225 return result.filter((val) => val).join("-"); 226} 227 228 229// ë ì§ì²´í¬ 230function check_date(date) { 231 var regex = RegExp(/^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$/); 232 if(regex.text(date)) return true; 233 return false; 234} 235 236function replace_date(date) { // ëë²ì§¸ íì´íì´ íìëì§ ìì 237 date = date.replace(/[^0-9]/g, ''); 238 if(date.length>8) return date.substring(0, date.length - 1).replace(/^(\d{0,4})(\d{0,2})(\d{0,2})$/g, "$1-$2-$3").replace(/\-{1,2}$/g, ""); 239 // console.log(date); 240 // console.log(date.length); 241 // if(date) return date.replace(/^(\d{0,4})(\d{0,2})(\d{0,2})$/g, "$1-$2-$3").replace(/\-{1,2}$/g, ""); // xxx-xxxx-xxxx 242 // if(date) return date.replace(/(\d{4})(\d{2})(\d{2})/g, '$1-$2-$3'); 243 if(date) return date.replace(/^(\d{0,4})(\d{0,2})(\d{0,2})$/g, "$1-$2-$3").replace(/\-{1,2}$/g, ""); // xx-xxxx-xxxx 244 // return false; 245} 246 247 248// 모ë°ì¼íì¸ 249function isMobile(){ 250 return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);} 251 252 253 254// ë°ì¹¨ì´ ìë 문ìì¸ì§ íì¸ í¨ì 255const isSingleCharacter = function(text) { 256 var strGa = 44032; // ê° 257 var strHih = 55203; // í£ 258 259 var lastStrCode = text.charCodeAt(text.length-1); 260 261 if(lastStrCode < strGa || lastStrCode > strHih) { 262 return false; //íê¸ì´ ìë ê²½ì° false ë°í 263 } 264 return (( lastStrCode - strGa ) % 28 == 0) 265} 266 267 268// 'ë¡' ê° ë¶ì´ì¼ íëì§ 'ì¼ë¡'ê° ë¶ì´ì¼ íëì§ ì²´í¬í´ì£¼ë í¨ì 269const roChecker = function(text){
270 return text + (isSingleCharacter(text)? 'ë¡' : 'ì¼ë¡'); 271} 272// '를' ì´ ë¶ì´ì¼ íëì§ 'ì'ì´ ë¶ì´ì¼ íëì§ë¥¼ ì²´í¬í´ì£¼ë í¨ì 273const rulChecker = function(text){ 274 return text + (isSingleCharacter(text)? '를' : 'ì'); 275} 276 277const gaChecker = function(text){ 278 return text + (isSingleCharacter(text)? 'ê°' : 'ì´'); 279} 280 281 282var getCookie = function(name) { 283 var value = document.cookie.match('(^|;) ?' + name + '=([^;]*)(;|$)'); 284 return value? value[2] : null; 285 }; 286 287 var setCookie = function(name, value, exp) { 288 var date = new Date(); 289 date.setTime(date.getTime() + exp*24*60*60*1000); 290 document.cookie = name + '=' + value + ';expires=' + date.toUTCString() + ';path=/'; 291}; 292 293var deleteCookie = function(name) { 294 document.cookie = name + '=; expires=Thu, 01 Jan 1999 00:00:10 GMT;path=/'; 295}
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.