PageSourceSearch

https://www.swn.kr/wp-content/plugins/kboard/skin/pure-gallery/list.js?ver=6.7.1

js swn.kr collected 2026-09-24 12:06:55 UTC 3,392 bytes, 104 lines download raw bytes

1/**
2 * @author https://www.cosmosfarm.com/
3 */
4
5/**
6 * inViewport jQuery plugin by Roko C.B.
7 * http://stackoverflow.com/a/26831113/383904 Returns a callback function with
8 * an argument holding the current amount of px an element is visible in
9 * viewport (The min returned value is 0 (element outside of viewport)
10 */
11(function($, win) {
12	$.fn.kboardPureGalleryViewport = function(cb) {
13		return this.each(function(i, el) {
14			function visPx() {
15				var elH = $(el).outerHeight(), H = $(win).height(), r = el.getBoundingClientRect(), t = r.top, b = r.bottom;
16				return cb.call(el, Math.max(0, t > 0 ? Math.min(elH, H - t) : (b < H ? b : H)));
17			}
18			visPx();
19			$(win).on("resize scroll", visPx);
20		});
21	};
22}(jQuery, window));
23
24jQuery(document).ready(function(){
25	kboard_pure_gallery_list_layout();
26	
27	setTimeout(function(){
28		jQuery('.kboard-pure-gallery-list .kboard-list-item').kboardPureGalleryViewport(function(px){
29			if(jQuery('#kboard-pure-gallery-list').hasClass('active-fadein')){
30				if(px && !jQuery(this).hasClass('animation-fadein')){
31					jQuery(this).addClass('animation-fadein');
32				}
33			}
34		});
35	});
36});
37
38jQuery(window).resize(function(){
39	kboard_pure_gallery_list_layout();
40});
41
42function kboard_pure_gallery_list_layout(){
43	jQuery('.kboard-pure-gallery-list').each(function(){
44		var parent = jQuery(this).parent('#kboard-pure-gallery-list');
45		var width = jQuery(parent).width();
46
47		if(!jQuery(parent).hasClass('pure-gallery-row')){
48			if(width > 1400){
49				jQuery(parent).removeClass('mw1400');
50				jQuery(parent).removeClass('mw1200');
51				jQuery(parent).removeClass('mw1000');
52				jQuery(parent).removeClass('mw800');
53				jQuery(parent).removeClass('mw600');
54			}
55			else if(width > 1200){
56				jQuery(parent).addClass('mw1400');
57				jQuery(parent).removeClass('mw1200');
58				jQuery(parent).removeClass('mw1000');
59				jQuery(parent).removeClass('mw800');
60				jQuery(parent).removeClass('mw600');
61			}
62			else if(width > 1000){
63				jQuery(parent).removeClass('mw1400');
64				jQuery(parent).addClass('mw1200');
65				jQuery(parent).removeClass('mw1000');
66				jQuery(parent).removeClass('mw800');
67				jQuery(parent).removeClass('mw600');
68			}
69			
70			else if(width > 800){
71				jQuery(parent).removeClass('mw1400');
72				jQuery(parent).removeClass('mw1200');
73				jQuery(parent).addClass('mw1000');
74				jQuery(parent).removeClass('mw800');
75				jQuery(parent).removeClass('mw600');
76			}
77			else if(width > 600){
78				jQuery(parent).removeClass('mw1400');
79				jQuery(parent).removeClass('mw1200');
80				jQuery(parent).removeClass('mw1000');
81				jQuery(parent).addClass('mw800');
82				jQuery(parent).removeClass('mw600');
83			}
84			else{
85				jQuery(parent).removeClass('mw1400');
86				jQuery(parent).removeClass('mw1200');
87				jQuery(parent).removeClass('mw1000');
88				jQuery(parent).removeClass('mw800');
89				jQuery(parent).addClass('mw600');
90			}
91		}
92		var item_width = jQuery('.kboard-list-item', this).width();
93		jQuery('.kboard-list-item .kboard-list-thumbnail', this).css({'height':item_width+'px'});
94	});
95}
96
97function kboard_pure_gallery_search_toggle(){
98	if(jQuery('.kboard-pure-gallery-search').hasClass('active-search')){
99		jQuery('.kboard-pure-gallery-search').removeClass('active-search');
100	}
101	else{
102		jQuery('.kboard-pure-gallery-search').addClass('active-search');
103	}
104}

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.