PageSourceSearch

https://ubsmart.kr/js/animate.js?v=260904

js ubsmart.kr collected 2026-09-24 15:05:18 UTC 6,132 bytes, 179 lines download raw bytes

1;(function($, window) {
2/*! SCROLL TO PLUGIN FOR GS
3 * VERSION: beta 1.7.1
4 **/
5(function ($) {
6  window.choppedjs = {};
7  function extend(){
8    for(var i=1; i<arguments.length; i++)
9    for(var key in arguments[i])
10      if(arguments[i].hasOwnProperty(key))
11        arguments[0][key] = arguments[i][key];
12    return arguments[0];
13  }
14  choppedjs.onEvent = function (eventType, handler, timeout, config) {
15    var defaults = {
16      name: 'unnamed',
17      mute: false,
18      immediate: true
19    };
20    this.options = extend({}, defaults, config);
21    this.eventType = eventType;
22    this.timeout = timeout;
23    this.handler = handler;
24    this.isExecuteTime = this.options.immediate;
25    this.interval = '';
26    var _this = this;
27    init();
28    function init() {
29      //reset the execute determiner
30      $(window)[_this.eventType](function () {
31        _this.isExecuteTime = true;
32      });
33      //execute the handler based on the timeout user passed
34      _this.interval = setInterval(function () {
35        if (_this.isExecuteTime && !_this.options.mute) {
36          try {
37			/*add*/
38			var body_css=$('body').attr('class');
39			//console.log("choppedjs.onEvent css:"+body_css);
40			if(!body_css.match(/edit/)){
41				handler();
42			}
43          } catch (err) {
44            console.log(err);
45          }
46          //turn off the exec time until user scroll again
47          _this.isExecuteTime = false;
48        }
49      }, _this.timeout);
50    }
51  };
52  choppedjs.onScroll = function (handler, timeout, options) {
53    return new choppedjs.onEvent('scroll', handler, timeout, options);
54  };
55  choppedjs.onResize = function (handler, timeout, options) {
56    return new choppedjs.onEvent('resize', handler, timeout, options);
57  };
58  choppedjs.onMousemove = function (handler, timeout, options) {
59    return new choppedjs.onEvent('mousemove', handler, timeout, options);
60  };
61}(jQuery));
62;
63
64
65/*
66 * Viewport - jQuery selectors for finding elements in viewport
67 *
68 * Copyright (c) 2008-2009 Mika Tuupola
69 *
70 * Licensed under the MIT license:
71 *   http://www.opensource.org/licenses/mit-license.php
72 *
73 * Project home:
74 *  http://www.appelsiini.net/projects/viewport
75 *
76 */
77(function ($) {
78        "use strict";
79        $.belowthefold = function (element, settings) {
80                var fold = $(window).height() + $(window).scrollTop();
81                return fold <= $(element).offset().top - settings.threshold;
82        };
83        $.abovethetop = function (element, settings) {
84                var top = $(window).scrollTop();
85                return top >= $(element).offset().top + $(element).height() - settings.threshold;
86        };
87        $.rightofscreen = function (element, settings) {
88                var fold = $(window).width() + $(window).scrollLeft();
89                return fold <= $(element).offset().left - settings.threshold;
90        };
91        $.leftofscreen = function (element, settings) {
92                var left = $(window).scrollLeft();
93                return left >= $(element).offset().left + $(element).width() - settings.threshold;
94        };
95        $.inviewport = function (element, settings) {
96                return !$.rightofscreen(element, settings) && !$.leftofscreen(element, settings) && !$.belowthefold(element, settings) && !$.abovethetop(element, settings);
97        };
98        $.extend($.expr[':'], {
99                "below-the-fold": function (a) {
100                        return $.belowthefold(a, {
101                                threshold: 0
102                        });
103                },
104                "above-the-top": function (a) {
105                        return $.abovethetop(a, {
106                                threshold: 0
107                        });
108                },
109                "left-of-screen": function (a) {
110                        return $.leftofscreen(a, {
111                                threshold: 0
112                        });
113                },
114                "right-of-screen": function (a) {
115                        return $.rightofscreen(a, {
116                                threshold: 0
117                        });
118                },
119                "in-viewport": function (a) {
120                        return $.inviewport(a, {
121                                threshold: -40
122                        });
123                }
124        });
125})(jQuery);
126
127function is_touch_device() {
128    return ('ontouchstart' in document.documentElement);
129}
130jQuery.exists = function(selector) {
131    return ($(selector).length > 0);
132};
133
134var scrollY = (window.pageYOffset !== undefined) ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body).scrollTop, // Updated 
134in global event handler
135    global_window_width = $(window).width(),
136    global_window_height = $(window).height(),
137    global_admin_bar,
138    global_admin_bar_height = 0;
139
140window.scroll = function() {
141    scrollY = (window.pageYOffset !== undefined) ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body).scrollTop;
142}
143
144
145// init
146$(document).ready(function() {
147var body_css=$('body').attr('class');
148//console.log("choppedjs.onEvent");
149//console.log( "body css:"+body_css );
150	if(!body_css.match(/edit/)){
151	    mk_animated_contents();
152	}else{
153        $('body').addClass('no-transform');
154	}
155    //  if (is_touch_device() || $(window).width() < 780) 
156//    if (is_touch_device()) {
157//        $('body').addClass('no-transform');
158//    } else {
159        choppedjs.onResize(mk_animated_contents, 50);
160        choppedjs.onScroll(mk_animated_contents, 10);
161//    }
162});
163
164
165/* Animated Contents */
166/* -------------------------------------------------------------------- */
167function mk_animated_contents() {
168  "use strict";
169  $(".qv-ani-ele").filter(":in-viewport").each(function (i) {
170    var $this = $(this);
171    if (!$this.hasClass('qv-in-viewport')) {
172      setTimeout(function () {
173        $this.addClass('qv-in-viewport');
174      }, 1000 * i);
175    }
176  });
177};
178
179})(jQuery, window);

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.