1function AlertPulldownBanner () { 2 var parent = $('#alertPulldown'); 3 var clsoeExit = parent.find('.close-exit'); 4 var clsoeDay = parent.find('.close-day'); 5 6 if (parseInt(localStorage.AlertPulldownBanner) + 8.64e+7 >= new Date().getTime()) { 7 parent.remove(); 8 return; 9 } 10 11 clsoeDay.on('click', function (event) { 12 if (event.target.tagName == 'INPUT') { 13 if (event.target.checked == true) { 14 localStorage.setItem('AlertPulldownBanner', new Date().getTime()); 15 } 16 17 else { 18 localStorage.removeItem('AlertPulldownBanner'); 19 } 20 } 21 }); 22 23 clsoeExit.on('click', function () { 24 parent.stop().slideUp(700, 'easeOutExpo'); 25 }); 26/* 27 var nowDe = new Date().getTime(); 28 29 $.get('/pil/json/popup/pil/xjGF8AByuyE.json?timestemp='+Config.timestemp).done(function (res) { 30 31 var template = ''; 32 33 for (var i=0; i<res.length; i++) { 34 35 var beginDe = new Date(res[i].beginDe).getTime(); 36 var endDe = new Date(res[i].endDe).getTime(); 37 var link = res[i].link; 38 var image = res[i].image; 39 var popupContentTitle = res[i].popupContentTitle; 40 var explanation = res[i].explanation; 41 var target = res[i].target; 42 var always = res[i].always; 43 44 var imgDirIndex = image.lastIndexOf('/pil'); 45 var imgDirUri = image.substr(imgDirIndex); 46 var img = imgDirUri.replace(/[\\]/g, '/'); 47 48 if (always != 'Y' && nowDe > beginDe && nowDe < endDe) { 49 50 template += '\n'+ 51 '\n\t<div class="alert-item">'+ 52 '\n\t\t<a href="'+link+'" class="alert-anchor"'+( target == 'Y' ? ' target="_blank" rel="noopener noreferrer" title="ìì°½"' : '' )+'>'+ 53 function () { 54 if (image.length) { 55 return '\n\t\t\t<div class="alert-img"><img src="'+img+'" alt="'+popupContentTitle+' ì¸ë¤ì¼"></div>'; 56 } 57 return ''; 58 }()+ 59 '\n\t\t\t<div class="alert-text">'+ 60 '\n\t\t\t\t<strong class="alert-title">'+popupContentTitle+'</strong>'+ 61 '\n\t\t\t\t<p class="alert-descript">'+explanation+'</p>'+ 62 '\n\t\t\t</div>'+ 63 '\n\t\t</a>'+ 64 '\n\t</div>'; 65 } 66 67 if (always == 'Y') { 68 69 template += '\n'+ 70 '\n\t<div class="alert-item">'+ 71 '\n\t\t<a href="'+link+'" class="alert-anchor"'+( target == 'Y' ? ' target="_blank" rel="noopener noreferrer" title="ìì°½"' : '' )+'>'+ 72 function () { 73 if (image.length) { 74 return '\n\t\t\t<div class="alert-img"><img src="'+img+'" alt="'+popupContentTitle+' ì¸ë¤ì¼"></div>'; 75 } 76 return ''; 77 }()+ 78 '\n\t\t\t<div class="alert-text">'+ 79 '\n\t\t\t\t<strong class="alert-title">'+popupContentTitle+'</strong>'+ 80 '\n\t\t\t\t<p class="alert-descript">'+explanation+'</p>'+ 81 '\n\t\t\t</div>'+ 82 '\n\t\t</a>'+ 83 '\n\t</div>'; 84 } 85 } 86*/ 87 88 var alertContainer = $('#alertPulldown .alert-container'); 89 // alertContainer.html(template); 90 91 if (alertContainer.children().length == 0) { 92 parent.hide(); 93 return; 94 } 95 96 new BannerSlide({ 97 parent: '#alertPulldown', 98 item: '.alert-item', 99 dir: '.alert-control', 100 duration: 700, 101 interval: 5000 102 }); 103 104 if (alertContainer.children().length) { 105 // documentComplete(function () { 106 parent.slideDown(1000, 'easeOutExpo'); 107 // }); 108 } 109/* 110 }).catch(function (err) { 111 parent.hide(); 112 });
113*/ 114} 115 116 117/* ë°°ë ì¬ë¼ì´ë */ 118function BannerSlide (config) { 119 var CONNFIG = config; 120 121 var parent = $(CONNFIG.parent); 122 var item = parent.find(CONNFIG.item); 123 var dirControl = parent.find(CONNFIG.dir).find('button'); 124 var slideInterval = null; 125 126 var slideMovement = function (state) { 127 128 var itemWrapper = item.parent(); 129 130 if (state == 'prev') { 131 itemWrapper.css({ left: itemWrapper.children().last().outerWidth()*-1 }); 132 itemWrapper.prepend(itemWrapper.children().last().detach()); 133 itemWrapper.stop().animate({ left: 0 }, CONNFIG.duration, 'easeOutExpo'); 134 } 135 136 if (state == 'next') { 137 itemWrapper.stop(false, true) 138 .animate({ left: itemWrapper.children().first().outerWidth()*-1 }, 139 CONNFIG.duration, 140 'easeOutCubic', 141 function () { 142 itemWrapper.css({ left: 0 }).append(itemWrapper.children().first().detach()); 143 }); 144 } 145 } 146 147 var playSlide = function () { 148 if (item.length > 1) { 149 slideInterval = setInterval(function () { 150 slideMovement('next'); 151 }, CONNFIG.interval); 152 } 153 else { 154 dirControl.hide(); 155 } 156 } 157 158 dirControl.on('click', function (event) { 159 event.preventDefault(); 160 clearInterval(slideInterval); 161 162 var t = $(this); 163 if (t.hasClass('play')) { 164 dirControl.filter('.play').hide(); 165 dirControl.filter('.stop').show(); 166 playSlide(); 167 } 168 else { 169 dirControl.filter('.play').show(); 170 dirControl.filter('.stop').hide(); 171 } 172 if (t.hasClass('prev')) { 173 slideMovement('prev'); 174 } 175 if (t.hasClass('next')) { 176 slideMovement('next'); 177 } 178 }); 179 180 playSlide(); 181 182 // í°ì¹ ì´ë²¤í¸ íë¦¬í¹ êµ¬í 183 var xStartpoint,xEndpoint; 184 185 function docSTART(event){ 186 if(event.originalEvent.changedTouches != undefined){ 187 xStartpoint = Math.floor(event.originalEvent.changedTouches[0].clientX - $(this).offset().left); 188 } 189 } 190 191 function docEND(event){ 192 if(event.originalEvent.changedTouches != undefined){ 193 xEndpoint = Math.floor(event.originalEvent.changedTouches[0].clientX - $(this).offset().left) - xStartpoint; 194 195 var dir; 196 197 if(xEndpoint < -50){ 198 dir = 'next'; 199 }else if(xEndpoint > 50){ 200 dir = 'prev'; 201 }else{ 202 return true; 203 } 204 205 clearInterval(slideInterval); 206 207 dirControl.filter('.play').show(); 208 209 dirControl.filter('.stop').hide(); 210 211 slideMovement(dir); 212 213 event.preventDefault(); 214 } 215 } 216 217 parent.on("touchstart",docSTART); 218 parent.on("touchend",docEND); 219} 220 221 222 223/* ì´ë²¤í¸ ì¬ë¼ì´ë */ 224function EventSlide (config) { 225 226 var CONNFIG = config; 227 228 var parent = $(CONNFIG.parent); 229 var item = parent.find(CONNFIG.item); 230 var page = parent.find(CONNFIG.page); 231 var dirControl = parent.find(CONNFIG.dir).find('button'); 232 233 var slideInterval = null; 234 var idx = 0; 235 236 var indexRotation = function (state) { 237 if (state == 'prev') { 238 if (idx > -1) { 239 idx--; 240 } 241 if (idx == -1) { 242 idx = item.length-1; 243 } 244 } 245 if (state == 'next') { 246 if (idx < item.length) { 247 idx++; 248 } 249 if (idx == item.length) { 250 idx = 0; 251 } 252 } 253 }; 254 255 var slideMovement = function () { 256 var _item = item.eq(idx); 257 var _remain = item.not(_item); 258 _item.stop().fadeIn(CONNFIG.duration, 'easeOutCubic'); 259 _remain.stop().fadeOut(CONNFIG.duration, 'easeOutCubic'); 260 } 261 262 var pagination = function () { 263 page.html('<i>'+(idx+1)+'</i> / ' + item.length); 264 } 265 266 var playSlide = function () { 267 slideInterval = setInterval(function () { 268 indexRotation('next'); 269 slideMovement(); 270 pagination(); 271 }, CONNFIG.interval); 272 } 273 274 dirControl.on('click', function (event) { 275 event.preventDefault(); 276 clearInterval(slideInterval); 277 var t = $(this); 278 if (t.hasClass('play')) { 279 dirControl.filter('.play').hide(); 280 dirControl.filter('.stop').show(); 281 playSlide(); 282 } 283 else { 284 dirControl.filter('.play').show(); 285 dirControl.filter('.stop').hide(); 286 } 287 288 if (t.hasClass('prev')) { 289 dirControl.filter('.play').show(); 290 dirControl.filter('.stop').hide(); 291 indexRotation('prev'); 292 slideMovement(); 293 pagination(); 294 } 295 296 if (t.hasClass('next')) { 297 dirControl.filter('.play').show(); 298 dirControl.filter('.stop').hide(); 299 indexRotation('next'); 300 slideMovement(); 301 pagination(); 302 } 303 }); 304 305 playSlide(); 306 pagination(); 307 308// í°ì¹ ì´ë²¤í¸ íë¦¬í¹ êµ¬í 309var xStartpoint,xEndpoint; 310 311function docSTART(event){ 312 if(event.originalEvent.changedTouches != undefined){ 313 xStartpoint = Math.floor(event.originalEvent.changedTouches[0].clientX - $(this).offset().left); 314 } 315} 316 317function docEND(event){ 318 if(event.originalEvent.changedTouches != undefined){ 319 xEndpoint = Math.floor(event.originalEvent.changedTouches[0].clientX - $(this).offset().left) - xStartpoint; 320 321 var dir; 322 323 if(xEndpoint < -50){ 324 dir = 'prev'; 325 }else if(xEndpoint > 50){ 326 dir = 'next'; 327 }else{ 328 return true; 329 } 330 331 clearInterval(slideInterval); 332 dirControl.filter('.play').show(); 333 dirControl.filter('.stop').hide(); 334 335 indexRotation(dir); 336 slideMovement(); 337 pagination(); 338 339 event.preventDefault(); 340 } 341} 342 343parent.on("touchstart",docSTART); 344parent.on("touchend",docEND); 345}
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.