PageSourceSearch

https://crashgambling.guru/wp-content/themes/uk/js/scripts.js?918

js crashgambling.guru collected 2026-10-09 22:49:22 UTC 4,371 bytes, 141 lines download raw bytes

1var $ = jQuery.noConflict();
2
3$(document).ready(function () {
4
5	$(document).on('click', '#menu-toggle', function () {
6		//$(this).toggleClass('active');
7		$('.main-nav').toggleClass('active');
8	});
9
10	/* menu */
11
12	$('.dropdown-menu').parent().addClass('has-dropdown');
13
14	checkClone2();
15	$(window).resize(function () {
16		checkClone2();
17	});
18
19	$('.main-nav-cloned .dropdown-menu').each(function () {
20		var title = $(this).parent().find('>a').html();
21		$(this).css('display', 'none');
22	});
23
24	$('.main-nav-cloned .dropdown-menu').each(function () {
25		var href = $(this).parent().find('>a').attr('href');
26		var title = $(this).parent().find('>a').text();
27	});
28
29	$(document).on('click', '.dropdown-menu>ul>li>a', function (e) {
30		var ul_length = $(this).parent().find('ul').length;
31		if (ul_length > 0) {
32			e.preventDefault();
33			$(this).parent().toggleClass('active').parent().find('li').not($(this).parent()).removeClass('active');
34		}
35	});
36
37	$(document).on('click', '.main-nav-cloned ul li.has-dropdown a.title', function (e) {
38		e.preventDefault();
39		$(this).parent().find('.dropdown-menu').css('position', 'relative')
40		$(this).parent().find('.dropdown-menu').slideToggle("fast", function () {
41			if (!$(this).parent().hasClass('active')) $(this).parent().addClass('active');
42			else $(this).parent().removeClass('active');
43		});
44	});
45	$(document).on('click', 'nav.active ul li.has-dropdown a.title', function (e) {
46		e.preventDefault();
47		$('nav.active .dropdown-menu').each(function () {	
48			$(this).css('display', 'none');
49		});
50		$(this).next().toggleClass('active');		
51	});
52
53	$(document).on('click', '.nav-header', function () {
54		$(this).toggleClass('active');
55		$('body').toggleClass('sidebar-active');
56	});
57
58	function checkClone2() {
59		if ($('.nav-header').css('display') == 'block') {
60
61			var main_nav = $('.main-nav').html();
62
63			if ($('#sidebar').html() == '') {
64				$('#sidebar').prepend('<nav class="main-nav-cloned">' + main_nav + '</nav>');
65				$('#sidebar').append('<div class="block block-filter block-filter-cloned">');
66				$('#sidebar').find('.block-filter-cloned').load(au_ajax.filter_url, function () {
67
68				});
69			}
70		} else {
71			$('.popular-live-dealer-games-cloned,.block-filter-cloned,.main-nav-cloned').remove();
72
73		}
74	}
75
76	let menu_items_min = 5;
77	let menu_hidden = '';
78	$('.main-nav ul > li.dropdown').each(function (i, e) {
79		if (i >= menu_items_min) {
80			menu_hidden += $(this)[0].outerHTML;
81			$(this).hide();
82		}
83	});
84	$('.main-nav ul').first().append('<li class="dropdown has-dropdown menu-dots"><a href="#" class="title"></a><div class="dropdown-menu"><ul class="menu-blocks">' + menu_hidden + '</ul></div></li>');
85	$(document).on("mouseleave", ".menu-dots>.dropdown-menu", function () {
86		$('.menu-dots').find('li.active').removeClass('active');
87	});
88
89	/* menu end */
90	
91	// Flexslider
92	if ($('div.flexslider').length > 0) {
93
94		const window_width = $(window).width();
95		const load_slider = () => {
96
97			const container_width = $('.container').width();
98			const toc_width = $('#ez-toc-container').outerWidth();
99
100			$('.flexslider-wrap').width(window_width > 768 ? container_width - toc_width - 20 : '100%');			
101
102			$('.flexslider').find('.lazy-slider[data-src]').each(function () {
103				$(this).attr('src', $(this).data('src')).removeAttr('data-src');
104			});
105
106			if ($("#flexslider-js").length === 0) {
107				const flex_slider_script = document.createElement("script");
108				flex_slider_script.type = "text/javascript";
109				flex_slider_script.id = "flexslider-js";
110				flex_slider_script.src = flexslider_url;
111				$("head").append(flex_slider_script);
112			}
113
114			$('.flexslider').flexslider({ animation: 'slide' });
115			$('.flex-direction-nav a').height('60px');
116		}
117
118		$(window).resize(() => {
119			load_slider();
120		});
121
122		if (window_width < 768) {
123			let fired = false;
124			window.addEventListener('scroll', () => {
125				if (!fired) {
126					fired = true;
127					setTimeout(() => {
128						load_slider();
129						fired = false;
130					}, 100);
131				}
132			});
133
134			const init_on_event = (event) => {
135				event.currentTarget.removeEventListener(event.type, init_on_event);
136			}
137			document.addEventListener('mousemove', init_on_event);
138			document.addEventListener('touchstart', init_on_event);
139		} else load_slider();
140	}
141});

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.