PageSourceSearch

https://philos-sophia.org/wp-content/themes/philossophia/library/js/main.js?ver=20180525

js philos-sophia.org collected 2026-09-26 03:20:37 UTC 4,851 bytes, 183 lines download raw bytes

1(function($){
2	
3	jQuery(function () {
4		$(".post-loop-list .post-loop-item").slice(0, 6).show();
5		$("#loadMore").on('click', function (e) {
6			e.preventDefault();
7			$(".post-loop-list .post-loop-item:hidden").slice(0, 3).slideDown();
8			if ($(".post-loop-list .post-loop-item:hidden").length == 0) {
9				$("#loadMore").fadeOut('slow');
10			}
11			$('html,body').animate({
12				scrollTop: $(this).offset().top
13			}, 1500);
14		});
15		if ($(".post-loop-list .post-loop-item:hidden").length == 0) {
16			$("#loadMore").fadeOut('slow');
17		}		
18	});	
19
20/*	
21	jQuery(function () {
22		$(".grid-item").slice(0, 6).show();
23		$("#loadMore").on('click', function (e) {
24			e.preventDefault();
25			$(".grid-item:hidden").slice(0, 2).slideDown();
26			if ($(".grid-item:hidden").length == 0) {
27				$("#loadMore1").fadeOut('slow');
28			}
29			$('html,body').animate({
30				scrollTop: $(this).offset().top
31			}, 1500);
32		});
33	});
34
35	
36	
37	jQuery(function () {
38		$(".tag .grid-item").slice(0, 7).show();
39		$("#loadMore1").on('click', function (e) {
40			e.preventDefault();
41			$(".tag .grid-item:hidden").slice(0, 2).slideDown();
42			if ($(".tag .grid-item:hidden").length == 0) {
43				$("#loadMore1").fadeOut('slow');
44			}
45			$('html,body').animate({
46				scrollTop: $(this).offset().top
47			}, 1500);
48		});
49	});	
50	
51	jQuery(function () {
52		$(".search .grid-item").slice(0, 7).show();
53		$("#loadMore1").on('click', function (e) {
54			e.preventDefault();
55			$(".search .grid-item:hidden").slice(0, 2).slideDown();
56			if ($(".search .grid-item:hidden").length == 0) {
57				$("#loadMore1").fadeOut('slow');
58			}
59			$('html,body').animate({
60				scrollTop: $(this).offset().top
61			}, 1500);
62		});
63	});	
64*/
65	
66	jQuery(function () {
67		$("#film-team .team-item").slice(0, 2).show();
68		$("#loadMoreTeam").on('click', function (e) {
69			e.preventDefault();
70			$("#film-team .team-item:hidden").slice(0, 2).slideDown();
71			if ($("#film-team .team-item:hidden").length == 0) {
72				$("#loadMoreTeam").fadeOut('slow');
73			}
74			$('html,body').animate({
75				scrollTop: $(this).offset().top
76			}, 1500);
77		});
78		if ($("#film-team .team-item:hidden").length == 0) {
79			$("#loadMoreTeam").fadeOut('slow');
80		}			
81	});	
82	
83	
84	jQuery(function () {
85		$(".advancedcollapse").on('click', function (e) {
86			$(this).toggleClass('active');
87		});
88	});
89	
90	jQuery('.carousel[data-type="multi"] .item').each(function() {
91		var next = $(this).next();
92		if (!next.length) {
93			next = $(this).siblings(':first');
94		}
95		next.children(':first-child').clone().appendTo($(this));
96
97		for (var i = 0; i < 1; i++) {
98			next = next.next();
99			if (!next.length) {
100				next = $(this).siblings(':first');
101			}
102
103			next.children(':first-child').clone().appendTo($(this));
104		}
105	});
106	
107	jQuery('#postCarouselGrid.carousel[data-type="multi"] .item').each(function() {
108		var next = $(this).next();
109		if (!next.length) {
110			next = $(this).siblings(':first');
111		}
112		next.children(':first-child').clone().appendTo($(this));
113
114		for (var i = 0; i < 1; i++) {
115			next = next.next();
116			if (!next.length) {
117				next = $(this).siblings(':first');
118			}
119
120			next.children(':first-child').clone().appendTo($(this));
121		}
122	});
123	
124	
125	// Select all links with hashes
126	jQuery('a[href*="#"]')
127	  // Remove links that don't actually link to anything
128	  .not('[href="#"]')
129	  .not('[href="#0"]')
130	  .not('[href="#postCarouselGrid"]')
131	  .not('[href="#myCarouselGrid"]')
132	  .not('[href="#myCarouselGridCM"]')
133	  .not('[href="#collapseSearch"]')
134	  .not('[href="#quotepass"]')
135	  .click(function(event) {
136		// On-page links
137		if (
138		  location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') 
139		  && 
140		  location.hostname == this.hostname
141		) {
142		  // Figure out element to scroll to
143		  var target = $(this.hash);
144		  target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
145		  // Does a scroll target exist?
146		  if (target.length) {
147			// Only prevent default if animation is actually gonna happen
148			event.preventDefault();
149			$('html, body').animate({
150			  scrollTop: target.offset().top
151			}, 2000, function() {
152			  // Callback after animation
153			  // Must change focus!
154			  var $target = $(target);
155			  $target.focus();
156			  if ($target.is(":focus")) { // Checking if the target was focused
157				return false;
158			  } else {
159				$target.attr('tabindex','-1'); // Adding tabindex for elements not focusable
160				$target.focus(); // Set focus again
161			  };
162			});
163		  }
164		}
165	  });	
166	  
167	function init() {
168		window.addEventListener('scroll', function(e){
169			var distanceY = window.pageYOffset || document.documentElement.scrollTop,
170				shrinkOn = 300,
171				header = document.querySelector("#masthead");
172				if (distanceY > shrinkOn) {
173					classie.add(header,"smaller");
174				} else {
175					if (classie.has(header,"smaller")) {
176						classie.remove(header,"smaller");
177					}
178				}
179			});
180		}
181	window.onload = init();		  
182	    
183})(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.