PageSourceSearch

https://www.wum.edu.pl/sites/all/themes/WUM/js/custom.js?v=1.x

js wum.edu.pl collected 2026-10-02 02:34:25 UTC 3,195 bytes, 135 lines download raw bytes

1jQuery(function() {
2	setWladzeHeight();
3	setStanowiskoHeight();
4	setNameHeight();
5	buttonKierunkiClass();
6	englishAnimate();
7});
8
9function setWladzeHeight(){
10	var maxHeight = -1;
11	jQuery('.wladze .text-group').each(function() {
12		if (jQuery(this).height() > maxHeight) {
13			maxHeight = jQuery(this).height();
14		}
15	});
16	jQuery('.wladze .text-group').height(maxHeight);
17}
18
19function setStanowiskoHeight(){
20	var maxHeight = -1;
21	jQuery('.wladze .text-group .stanowisko').each(function() {
22		if (jQuery(this).height() > maxHeight) {
23			maxHeight = jQuery(this).height();
24		}
25	});
26	jQuery('.wladze .text-group .stanowisko').height(maxHeight);
27}
28
29function setNameHeight(){
30	var maxHeight = -1;
31	jQuery('.wladze .text-group .views-field-title').each(function() {
32		if (jQuery(this).height() > maxHeight) {
33			maxHeight = jQuery(this).height();
34		}
35	});
36	jQuery('.wladze .text-group .views-field-title').height(maxHeight);
37}
38
39function buttonKierunkiClass(){
40	jQuery("input:radio:checked").next('label').addClass("checked");
41}
42
43function englishAnimate() {
44
45		if (window.innerWidth < 992) {
46		return;
47	}
48
49	var allMods = jQuery("#english-page .block-one, \
50	#english-page .block-two, \
51	#english-page .block-three, \
52	#english-page .block-four, \
53	#english-page .block-five, \
54	#english-page .block-six");
55
56	function checkVisibility() {
57		var windowBottom = jQuery(window).scrollTop() + jQuery(window).height();
58
59		allMods.each(function() {
60			var el = jQuery(this);
61
62			// jeśli już animowany → pomiń
63			if (el.hasClass("visible") || el.hasClass("animating")) return;
64
65			var elementTop = el.offset().top;
66
67			if (elementTop < windowBottom - 100) {
68
69				el.addClass("animating");
70
71				setTimeout(function () {
72					el.addClass("visible");
73				}, 300);
74			}
75		});
76	}
77
78	// 🔥 ważne: najpierw usuwamy poprzedni event (Drupal!)
79	jQuery(window)
80		.off('scroll.englishAnimate')
81		.on('scroll.englishAnimate', checkVisibility);
82
83	// start
84	checkVisibility();
85}
86
87(function($) {
88
89	/**
90	 * Copyright 2012, Digital Fusion
91	 * Licensed under the MIT license.
92	 * http://teamdf.com/jquery-plugins/license/
93	 *
94	 * @author Sam Sehnert
95	 * @desc A small plugin that checks whether elements are within
96	 *     the user visible viewport of a web browser.
97	 *     only accounts for vertical position, not horizontal.
98	 */
99  
100	$.fn.visible = function(partial) {
101  
102	  var $t = $(this),
103		$w = $(window),
104		viewTop = $w.scrollTop(),
105		viewBottom = viewTop + $w.height(),
106		_top = $t.offset().top,
107		_bottom = _top + $t.height(),
108		compareTop = partial === true ? _bottom : _top,
109		compareBottom = partial === true ? _top : _bottom;
110  
111	  return ((compareBottom <= viewBottom) && (compareTop >= viewTop));
112  
113	};
114  
115  })(jQuery);
116
117	var win = jQuery(window);
118	var allMods = jQuery(".mk-module");
119	
120	allMods.each(function(i, el) {
121	  var el = jQuery(el);
122	  if (el.visible(true)) {
123		el.addClass("already-visible");
124	  }
125	});
126	
127	win.scroll(function(event) {
128	  allMods.each(function(i, el) {
129		var el = jQuery(el);
130		if (el.visible(true)) {
131		  el.addClass("come-in");
132		}
133	  });
134	})
135	

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.