PageSourceSearch

https://aaronpk.tv/assets/js/main.js

js aaronpk.tv collected 2026-10-05 19:35:21 UTC 2,705 bytes, 145 lines download raw bytes

1/*
2	Solid State 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		$header = $('#header'),
12		$banner = $('#banner');
13
14	// Breakpoints.
15		breakpoints({
16			xlarge:	'(max-width: 1680px)',
17			large:	'(max-width: 1280px)',
18			medium:	'(max-width: 980px)',
19			small:	'(max-width: 736px)',
20			xsmall:	'(max-width: 480px)'
21		});
22
23	// Play initial animations on page load.
24		$window.on('load', function() {
25			window.setTimeout(function() {
26				$body.removeClass('is-preload');
27			}, 100);
28		});
29
30	// Header.
31		if ($banner.length > 0
32		&&	$header.hasClass('alt')) {
33
34			$window.on('resize', function() { $window.trigger('scroll'); });
35
36			$banner.scrollex({
37				bottom:		$header.outerHeight(),
38				terminate:	function() { $header.removeClass('alt'); },
39				enter:		function() { $header.addClass('alt'); },
40				leave:		function() { $header.removeClass('alt'); }
41			});
42
43		}
44
45	// Menu.
46		var $menu = $('#menu');
47
48		$menu._locked = false;
49
50		$menu._lock = function() {
51
52			if ($menu._locked)
53				return false;
54
55			$menu._locked = true;
56
57			window.setTimeout(function() {
58				$menu._locked = false;
59			}, 350);
60
61			return true;
62
63		};
64
65		$menu._show = function() {
66
67			if ($menu._lock())
68				$body.addClass('is-menu-visible');
69
70		};
71
72		$menu._hide = function() {
73
74			if ($menu._lock())
75				$body.removeClass('is-menu-visible');
76
77		};
78
79		$menu._toggle = function() {
80
81			if ($menu._lock())
82				$body.toggleClass('is-menu-visible');
83
84		};
85
86		$menu
87			.appendTo($body)
88			.on('click', function(event) {
89
90				event.stopPropagation();
91
92				// Hide.
93					$menu._hide();
94
95			})
96			.find('.inner')
97				.on('click', '.close', function(event) {
98
99					event.preventDefault();
100					event.stopPropagation();
101					event.stopImmediatePropagation();
102
103					// Hide.
104						$menu._hide();
105
106				})
107				.on('click', function(event) {
108					event.stopPropagation();
109				})
110				.on('click', 'a', function(event) {
111
112					var href = $(this).attr('href');
113
114					event.preventDefault();
115					event.stopPropagation();
116
117					// Hide.
118						$menu._hide();
119
120					// Redirect.
121						window.setTimeout(function() {
122							window.location.href = href;
123						}, 350);
124
125				});
126
127		$body
128			.on('click', 'a[href="#menu"]', function(event) {
129
130				event.stopPropagation();
131				event.preventDefault();
132
133				// Toggle.
134					$menu._toggle();
135
136			})
137			.on('keydown', function(event) {
138
139				// Hide on escape.
140					if (event.keyCode == 27)
141						$menu._hide();
142
143			});
144
145})(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.