1$(document).ready(function(){ 2 var $wrapBody = $("#user-wrap") 3 , $fontsOption = $wrapBody.find(".fonts-option") 4 , $fontsBtn = $fontsOption.find(".fonts-btn") 5 , $fontsPanel = $fontsOption.find(".fonts-option-panel"); 6 7 8 // í°í¸í¬ê¸° 9 $fontsBtn.on({ 10 click: function(){ 11 if($fontsPanel.css("display") == "block") { 12 $fontsPanel.hide(); 13 $fontsBtn.removeClass("active"); 14 } else { 15 $fontsPanel.show(); 16 $fontsBtn.addClass("active"); 17 } 18 } 19 }); 20 21 // 기ì¬ë³¸ë¬¸ í°í¸ì¬ì´ì¦ ì´ë²¤í¸ new 22 $('#article-view').on('click', '.fontsise-btn', function(e){ 23 var changeType = $(this).val(); 24 var newFontSize = nowFontSize = get_article_fontsize(); 25 if(changeType == "up") newFontSize = parseInt(nowFontSize) + 1; 26 else if(changeType == "down") newFontSize = parseInt(nowFontSize) - 1; 27 if(newFontSize < 15 || newFontSize > 20) newFontSize = nowFontSize; 28 Util.setCookie("article-view-page-fontsize", newFontSize, 30); 29 change_article_fontsize(newFontSize); 30 }); 31 32 // 기ì¬ë³¸ë¬¸ í°í¸ì¬ì´ì¦ ì´ë²¤í¸ old í¸í 33 $('.article-view-header, #article-header-title').on('click', '.fontsize-radio', function(e){ 34 var newFontSize = $(this).val(); 35 Util.setCookie("article-view-page-fontsize", newFontSize, 30); 36 change_article_fontsize(newFontSize); 37 }); 38 39 // í°í¸í´ëì¤ ë³ê²½ 40 function change_article_fontsize(fontsize) { 41 $('.view-page').removeClass('font-size15 font-size16 font-size17 font-size18 font-size19 font-size20').addClass('font-size'+fontsize); 42 } 43 44 // ì¿ í¤ê°ì ¸ì¤ê¸° 45 function get_article_fontsize() { 46 var cookieFontsize = Util.getCookie("article-view-page-fontsize"); 47 if(cookieFontsize == "" || isNaN(cookieFontsize)) cookieFontsize = "18"; 48 return cookieFontsize; 49 } 50 51 function init_article_fontsize() { 52 change_article_fontsize(get_article_fontsize()); 53 } 54 55 /* ì´ê¸° ì¤í */ 56 init_article_fontsize(); 57 58 // dropdown for font size setting(2025) 59 const FONTSIZE_DROPDOWN = $(".fontsize-dropdown"); 60 const FONTSIZE_PARENT = FONTSIZE_DROPDOWN.find(".fontsize-container"); 61 const FONTSIZE_ITEM = FONTSIZE_PARENT.find(".fontsize-slider-item"); 62 const FONTSIZE_CONTENT = $('#article-view-content-div'); 63 const FONTSIZE_ACTIVE = "active"; 64 const FONTSIZE_STEP = 5; 65 const FONTSIZE_CONTENT_NEW = $('.atlview-body'); 66 const ROOT = document.documentElement; 67 const ROOT_STYLE = getComputedStyle(ROOT); 68 69 FONTSIZE_DROPDOWN 70 .on("show.zf.dropdown", function(e) { 71 $(e.currentTarget).find(".btn-close").attr("tabindex", "1").show(); 72 }) 73 .on("hide.zf.dropdown", function(e) { 74 $(e.currentTarget).find(".btn-close").attr("tabindex", "-1").hide(); 75 }) 76 .on("click", "[data-fontsize]", function(e) { 77 const _newFontSize = $(e.currentTarget).data("fontsize"); 78 79 if(FONTSIZE_CONTENT_NEW.length > 0) Util.setCookie("article-view-page-fontsize-style", _newFontSize, 30); 80 else Util.setCookie("article-view-page-fontsize", _newFontSize, 30); 81 82 change_atlview_fontsize(_newFontSize, FONTSIZE_PARENT, FONTSIZE_ITEM, FONTSIZE_CONTENT, FONTSIZE_ACTIVE, FONTSIZE_STEP, FONTSIZE_CONTENT_NEW); 83 }) 84 .on("click", ".btn-close", function(e) { 85 $(e.delegateTarget).foundation("close"); 86 }); 87 88 // ì¿ í¤ê°ì ¸ì¤ê¸° 89 function get_article_fontsize_style() { 90 var cookieFontsize = Util.getCookie("article-view-page-fontsize-style"); 91 if(cookieFontsize == "" || isNaN(cookieFontsize)) cookieFontsize = parseFloat(ROOT_STYLE.getPropertyValue('--nd-atl-view-font-size')); 92 return cookieFontsize; 93 } 94 95 // change for font classes 96 function change_atlview_fontsize(fontsize, parent, item, content, activeClass, stepCount, contentNew) { 97 if(contentNew.length > 0) { 98 contentNew.removeClass(function(index, className) { 99 return (className.match(/(^|\s)font-size\S+/g) || []).join(' '); 100 }); 101 contentNew[0].style.setProperty("--nd-atl-view-font-size", fontsize+"px"); 102 } else { 103 content.removeClass('font-size16 font-size18 font-size20 font-size22 font-size24').addClass('font-size'+fontsize); 104 } 105 item.removeClass(activeClass); 106 $("[data-fontsize="+ fontsize +"]").addClass(activeClass); 107 item.each(function(i, e) { 108 if($(e).hasClass(activeClass)) { 109 const _data = $(e).data("step"); 110 const _offset = Number((100 / stepCount) * (_data - 1)) + "%"; 111 parent.attr("style", "--nd-slider-icon-left:"+_offset+";--nd-slider-preview-font-size:" + Number(fontsize * 0.0625) + "rem;"); 112 } 113 }); 114 } 115 116 function init_atlview_fontsize() { 117 if(FONTSIZE_CONTENT_NEW.length > 0) var getArtFontSize = get_article_fontsize_style(); 118 else var getArtFontSize = get_article_fontsize(); 119 change_atlview_fontsize(getArtFontSize, FONTSIZE_PARENT, FONTSIZE_ITEM, FONTSIZE_CONTENT, FONTSIZE_ACTIVE, FONTSIZE_STEP, FONTSIZE_CONTENT_NEW); 120 } 121 122 // run program 123 init_atlview_fontsize(); 124}); 125 126/*** 127after, append, before ë± HTML ì½ì ì script ë§í¬ë ìì²´ì ì¼ë¡ ajax í¸ì¶ì ìëí¨ 128ì´ë ajax options cache=falseê° ëì´ ìºìê° ìëë ìµì ì ë°ê¾¸ì´ ì¤(bannerë¡ íì íì¬ ë¤ë¥¸ê³³ì ìí¥ì ì¤ì) 129https://api.jquery.com/jQuery.ajaxPrefilter/ 130***/ 131$.ajaxPrefilter(function(options, originalOptions, jqXHR){ 132 var o=options, oo=originalOptions; 133 if(o.url.indexOf("/bannerpop/uploads/")>0 && oo.async===false && oo.dataType=="script" && o.dataType==oo.dataType) options.cache=true; 134});
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.