PageSourceSearch

https://www.kncn.net/assets/js/main.js

js kncn.net collected 2026-10-02 06:55:17 UTC 2,672 bytes, 123 lines download raw bytes

1/*
2	Prologue by HTML5 UP
3	html5up.net | @ajlkn
4	Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
5*/
6
7(function($) {
8
9	var	$window = $(window),
10		$body = $('body'),
11		$nav = $('#nav');
12
13	// Breakpoints.
14		breakpoints({
15			wide:      [ '961px',  '1880px' ],
16			normal:    [ '961px',  '1620px' ],
17			narrow:    [ '961px',  '1320px' ],
18			narrower:  [ '737px',  '960px'  ],
19			mobile:    [ null,     '736px'  ]
20		});
21
22	// Play initial animations on page load.
23		$window.on('load', function() {
24			window.setTimeout(function() {
25				$body.removeClass('is-preload');
26			}, 100);
27		});
28
29	// Nav.
30		var $nav_a = $nav.find('a');
31
32		$nav_a
33			.addClass('scrolly')
34			.on('click', function(e) {
35
36				var $this = $(this);
37
38				// External link? Bail.
39					if ($this.attr('href').charAt(0) != '#')
40						return;
41
42				// Prevent default.
43					e.preventDefault();
44
45				// Deactivate all links.
46					$nav_a.removeClass('active');
47
48				// Activate link *and* lock it (so Scrollex doesn't try to activate other links as we're scrolling to this one's section).
49					$this
50						.addClass('active')
51						.addClass('active-locked');
52
53			})
54			.each(function() {
55
56				var	$this = $(this),
57					id = $this.attr('href'),
58					$section = $(id);
59
60				// No section for this link? Bail.
61					if ($section.length < 1)
62						return;
63
64				// Scrollex.
65					$section.scrollex({
66						mode: 'middle',
67						top: '-10vh',
68						bottom: '-10vh',
69						initialize: function() {
70
71							// Deactivate section.
72								$section.addClass('inactive');
73
74						},
75						enter: function() {
76
77							// Activate section.
78								$section.removeClass('inactive');
79
80							// No locked links? Deactivate all links and activate this section's one.
81								if ($nav_a.filter('.active-locked').length == 0) {
82
83									$nav_a.removeClass('active');
84									$this.addClass('active');
85
86								}
87
88							// Otherwise, if this section's link is the one that's locked, unlock it.
89								else if ($this.hasClass('active-locked'))
90									$this.removeClass('active-locked');
91
92						}
93					});
94
95			});
96
97	// Scrolly.
98		$('.scrolly').scrolly();
99
100	// Header (narrower + mobile).
101
102		// Toggle.
103			$(
104				'<div id="headerToggle">' +
105					'<a href="#header" class="toggle"></a>' +
106				'</div>'
107			)
108				.appendTo($body);
109
110		// Header.
111			$('#header')
112				.panel({
113					delay: 500,
114					hideOnClick: true,
115					hideOnSwipe: true,
116					resetScroll: true,
117					resetForms: true,
118					side: 'left',
119					target: $body,
120					visibleClass: 'header-visible'
121				});
122
123})(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.