1$( document ).ready(function () { 2 const main_swiper = new Swiper('.mainSwiper', { 3 slidesPerView: 3, 4 spaceBetween: 31, 5 loop: true, 6 autoplay: true, 7 navigation: { 8 nextEl: ".swiper-button-next", 9 prevEl: ".swiper-button-prev", 10 }, 11 breakpoints: { 12 // 모ë°ì¼ ì¸ë¡ëª¨ë 13 320: { 14 slidesPerView: "auto", 15 spaceBetween: 12, 16 }, 17 // í ë¸ë¦¿ ì¸ë¡ëª¨ë 18 490: { 19 slidesPerView: 3 20 }, 21 // í ë¸ë¦¿ ê°ë¡ëª¨ë 22 1024: { 23 slidesPerView: 3 24 } 25 } 26 }); 27 28 const lank_swiper = new Swiper('.rankSwiper', { 29 slidesPerView: 3, 30 spaceBetween: 16, 31 loop: true, 32 //autoplay: true, 33 navigation: { 34 nextEl: ".swiper-button-next", 35 prevEl: ".swiper-button-prev", 36 }, 37 breakpoints: { 38 // 모ë°ì¼ ì¸ë¡ëª¨ë 39 320: { 40 slidesPerView: "auto", 41 spaceBetween: 12, 42 }, 43 // í ë¸ë¦¿ ì¸ë¡ëª¨ë 44 490: { 45 slidesPerView: 2 46 }, 47 // í ë¸ë¦¿ ê°ë¡ëª¨ë 48 1024: { 49 slidesPerView: 3 50 } 51 } 52 }); 53 54 $(".subMenu li").click(function(){ 55 $(".subMenu li").removeClass("active"); 56 $(this).addClass("active"); 57 var clickedText = $(this).text(); 58 if(clickedText == "ì¸ê¸°ì"){ 59 displayWeekList(weekListByPop); 60 }else if(clickedText == "ì ë°ì´í¸ì"){ 61 displayWeekList(weekListByUpdate); 62 }else if(clickedText == "ì¡°íì"){ 63 displayWeekList(weekListByViews); 64 } 65 66 }); 67 displayWeekList(weekListByPop); 68 displayNewList(newList); 69 displayAllCategories(rankList); 70 displayTotalRanking(totalList); 71 displayEventList(eventList); 72 displayRecommendList(recommendList); 73 74 $("#banner").on("click", function () { 75 const os = getMobileOperatingSystem(); 76 if (os === "Android") { 77 // Play Store ë§í¬ë¡ ì´ë 78 window.location.href = "market://details?id=com.cocoreelshort"; 79 } else if (os === "iOS") { 80 // App Store ë§í¬ë¡ ì´ë 81 //window.location.href = "https://apps.apple.com/app/id1672471445"; 82 } else { 83 // alert("ì§ìëì§ ìë íë«í¼ì ëë¤."); 84 } 85 }); 86}); 87 88 89function displayRecommendList(toonList){ 90 var source = $("#webtoonlist_type1_template").html(); 91 92 Handlebars.registerHelper('decrementAdStart', function(ad_start) { 93 return parseInt(ad_start) - 1; 94 }); 95 96 var template = Handlebars.compile(source); 97 98 var html = template({ toons: toonList }); 99 100 $("#recommendList").html(html); 101} 102 103function displayEventList(toonList){ 104 var source = $("#webtoonlist_type1_template").html(); 105 106 Handlebars.registerHelper('decrementAdStart', function(ad_start) { 107 return parseInt(ad_start) - 1; 108 }); 109 110 var template = Handlebars.compile(source); 111 112 var html = template({ toons: toonList }); 113 $("#eventList").html(html); 114} 115 116// ì¹í° 리ì¤í¸ë¥¼ íë©´ì íìíë í¨ì 117function displayTotalRanking(toonList) { 118 toonList.forEach((toon, index) => { 119 toon.rank = index + 1; // ìì ì¤ì 120 }); 121 // Handlebars í í릿 ìì¤ ê°ì ¸ì¤ê¸° 122 var source = $("#webtoonlist_type2_template").html(); 123 // í í릿 ì»´íì¼ 124 var template = Handlebars.compile(source); 125 // ì»´íì¼ë HTML ìì± 126 var html = template({ toons: toonList }); 127 // ì¹´í ê³ ë¦¬ IDì í´ë¹íë ììì HTML ë¿ë¦¬ê¸° 128 $("#totalList").html(html); 129} 130 131// 모ë ì¹´í ê³ ë¦¬ì ëí´ ì¹í° 리ì¤í¸ë¥¼ íë©´ì íì 132function displayAllCategories(webtoonData) { 133 const categoryIds = [ 134 "rankFantasy", "rankAction", "rankRomance", 135 "rankThriller", "rankFiction", "rankSports", "rankEveryday", "rankBl", 136 "rankBoy", "rankDrama" 137 ]; 138 139 categoryIds.forEach((id, index) => { 140 const toonList = webtoonData[(index + 1).toString()]; 141 if (toonList && toonList.length > 0) { 142 displayRankList(toonList, id); 143 } 144 }); 145} 146 147function displayWeekList(toonList){ 148 var source = $("#webtoonlist_type1_template").html(); 149 150 var template = Handlebars.compile(source); 151 152 var html = template({ toons: toonList }); 153 154 $("#weekList").html(html); 155} 156 157function displayNewList(toonList){ 158 var source = $("#webtoonlist_type1_template").html(); 159 160 var template = Handlebars.compile(source); 161 162 var html = template({ toons: toonList }); 163 164 $("#newList").html(html); 165} 166 167 168// ì¹í° 리ì¤í¸ë¥¼ íë©´ì íìíë í¨ì 169function displayRankList(toonList, categoryId) { 170 toonList.forEach((toon, index) => { 171 toon.rank = index + 1; // ìì ì¤ì 172 });
173 // Handlebars í í릿 ìì¤ ê°ì ¸ì¤ê¸° 174 var source = $("#webtoonlist_type2_template").html(); 175 // í í릿 ì»´íì¼ 176 var template = Handlebars.compile(source); 177 // ì»´íì¼ë HTML ìì± 178 var html = template({ toons: toonList }); 179 // ì¹´í ê³ ë¦¬ IDì í´ë¹íë ììì HTML ë¿ë¦¬ê¸° 180 $(`#${categoryId}`).html(html); 181} 182 183// ì¬ì©ì ì ì í¬í¼ ë±ë¡ 184Handlebars.registerHelper('isEqual', function(a, b, options) { 185 if (a == b) { // == ì¬ì©: 문ìì´ê³¼ ì«ì ë¹êµë¥¼ 모ë ì²ë¦¬í ì ìì 186 return options.fn(this); // ì¡°ê±´ì´ ì°¸ì¼ ëì ë¸ë¡ 187 } else { 188 return options.inverse(this); // ì¡°ê±´ì´ ê±°ì§ì¼ ëì ë¸ë¡ 189 } 190}); 191 192Handlebars.registerHelper('decrementAdStart', function(ad_start) { 193 return parseInt(ad_start) - 1; 194});
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.