PageSourceSearch

https://www.aladin.co.kr/js/aladin.plugin.js?ver=202610011735

js aladin.co.kr collected 2026-10-01 08:38:26 UTC 6,040 bytes, 185 lines download raw bytes

1
2
3(function ($) { var o = $({}); $.subscribe = function () { o.on.apply(o, arguments);}; $.unsubscribe = function () { o.off.apply(o, arguments); }; $.publish = function () { o.trigger.apply(o, arguments); };}(jQuery));
4(function ($) {
5		var Fullpop = function (element) {
6			this.$win = $(window);
7			this.$body = $('body');
8			this.$element = $(element);
9			this.is_searchLayer = this.$element.is('[id="ui-search-layer"]') || this.$element.is('[id="searchFullLayer"]');
10			this.is_eventnotice = this.$element.is('.event-notice');
11			this.winHeight = this.$win.height();
12			if (window.screen.availHeight - this.winHeight > 200) {
13				//this.winHeight = window.screen.availHeight - 200;
14			}
15			this.minTop = this.is_searchLayer ? 0 : 58;
16			this.reset();
17			this.useIScroll = this.$element.is('.iscroll');
18			this.preventDef = function (e) { e.preventDefault(); }
19
20			this.scrollable = function () {
21				this.$scrbox.scrollTop(1);
22				this.$scrbox.addClass('scrollable');
23				var o = this;
24				if (!this.$scrbox.children('.scroll-box').length) {
25					this.$scrbox.wrapInner('<div class="scroll-box"></div>');
26				}
27				var $cont = this.$scrbox.find('.scroll-box');
28				var contHight = 0;
29				function setIscroll() {
30					contHight = $cont.height();
31
32					if (this.$scrbox.data('iscroll')) {
33						this.$scrbox.data('iscroll').destroy();
34					}
35					this.$scrbox.data('iscroll', new IScroll(this.$scrbox[0], {
36						scrollY: true,
37						scrollX: false,
38						resize: true,
39						mouseWheel: true,
40						scrollbars: true,
41						preventDefaultException: { tagName: /.*/ }
42					}));
43				};
44
45				setIscroll.apply(this);
46				$(window).off('resize.pop-iscroll').on('resize.pop-iscroll', function () {
47					setTimeout(function () {
48						if (contHight != $cont.height()) {
49							setIscroll.apply(o);
50						}
51					}, 100);
52				});
53			};
54
55			$(document).on('click', '.full-modal-backdrop', function () {
56				$('.popup-full').filter(':visible').fullpop('hide');
57			});
58		}
59
60		Fullpop.prototype.reset = function () {
61			var o = this;
62			this.$backdrop = $('.full-modal-backdrop');
63			this.$cont = this.$element.find('.popup-full-content,>.content');
64			this.$element.find('[data-rel="popup-full-close"]').off('click.popclose').on('click.popclose', function () {
65				o.hide();
66			});
67			this.$terms = this.$element.find('.scroll_area, .scroller, .scrollbox');
68			this.$scrbox = this.$terms.length ? this.$terms : this.$element;
69		}
70		//show
71		Fullpop.prototype.show = function () {
72			var breforeEvt = $.Event('show.ui.fullpop', this.$element),
73				afterEvt = $.Event('shown.ui.fullpop', this.$element)
74
75			this.$element.trigger(breforeEvt);
76			this.reset();
77			this.$element.data('prevScrollTop', $(document).scrollTop());
78			if (this.is_searchLayer) {
79				this.$element.height(this.winHeight);
80			} else {
81				this.$element.height('');
82				this.$element.css({ 'transform': 'translateY(' + this.winHeight + 'px)' });
83			}
84
85			if (this.useIScroll) {
86				document.addEventListener('touchmove', this.preventDef, { passive: false });
87				document.addEventListener('mousewheel', this.preventDef, { passive: false });
88			}
89
90			$("body").css("touch-action", "none");
91			var defTop = 0;
92			this.$body.addClass('open-popup-full-ready');
93			setTimeout($.proxy(function () {
94				this.$element.show(0, $.proxy(function () {
95					if (!this.is_searchLayer) {
96						var termsH = this.$element.outerHeight();
97						if (this.winHeight - this.minTop < termsH) {
98							this.$element.height(this.winHeight - this.minTop);
99							if (this.useIScroll) {
100								this.scrollable();
101							}
102						} else {
103							if (this.$scrbox.length > 0 && this.useIScroll) {
104								this.scrollable();
105							}
106						}
107					}
108					if (this.is_eventnotice) {
109						if (!this.$backdrop.length) {
110							$('body').append('<div class="full-modal-backdrop"></div>');
111							this.$backdrop = $('.full-modal-backdrop');
112						}
113						this.$backdrop.css({ display: 'block', 'opacity': '0' });
114						setTimeout($.proxy(function () {
115							this.$backdrop.css({ 'opacity': '0.4' });
116						}, this), 1);
117					}
118				}, this));
119				setTimeout($.proxy(function () {
120					if (!this.is_searchLayer) {
121						this.$element.css({ 'transform': 'translateY(' + defTop + 'px)' });
122					}
123					setTimeout($.proxy(function () {
124						this.$body.addClass('open-popup-full');
125						//$(document).scrollTop(0);
126					}, this), 350);
127				}, this), 1);
128			}, this), 100);
129			this.$element.trigger(afterEvt);
130		}
131
132		//hide
133		Fullpop.prototype.hide = function () {
134			var breforeEvt = $.Event('hide.ui.fullpop', this.$element),
135				afterEvt = $.Event('hidden.ui.fullpop', this.$element);
136
137			this.$element.trigger(breforeEvt);
138			this.reset();
139			var is_fullpop = $('.popup-full').filter(':visible').length >= 2;
140
141			if (this.useIScroll) {
142				document.removeEventListener('touchmove', this.preventDef);
143				document.removeEventListener('mousewheel', this.preventDef);
144			}
145
146			//mkm.app.AppRefresh.restore();
147
148			if (!is_fullpop) {
149				$("body").css("touch-action", "initial");
150				this.$body.removeClass('open-popup-full');
151			}
152			$(document).scrollTop(this.$element.data('prevScrollTop'));
153			var h = this.$win.height();
154			setTimeout($.proxy(function () {
155				if (!is_fullpop) {
156					this.$body.removeClass('transition-none-popup-full');
157					this.$backdrop.css({ 'opacity': '0' });
158				}
159				if (!this.is_searchLayer) {
160					this.$element.css({ 'transform': 'translateY(' + h + 'px)' });
161				}
162
163			}, this), 1);
164			setTimeout($.proxy(function () {
165				if (!is_fullpop) {
166					this.$body.removeClass('open-popup-full-ready');
167					this.$backdrop.css({ display: 'none' });
168				}
169				if (!this.is_searchLayer) {
170					this.$element.css({ 'transform': '' });
171				}
172				this.$element.hide();
173			}, this), 400);
174
175			this.$scrbox.scrollTop(1);
176			this.$element.trigger(afterEvt)
177		}
178		$.fn.fullpop = function (_options) {
179			return this.each(function () {
180				var data = $(this).data('ui.fullpop');
181				if (!data) $(this).data('ui.fullpop', (data = new Fullpop(this)));
182				data[_options]();
183			});
184		}
185	})(jQuery);

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.