PageSourceSearch

https://italianshotclub.com/js/custom.js

js italianshotclub.com collected 2026-09-28 15:29:49 UTC 3,143 bytes, 114 lines download raw bytes

1function mobileMenuAnim() {
2	$(".searchbar").removeClass("on");
3	$(".icon-hamburger").toggleClass("change");  
4	$(".sidebar-menu").toggleClass("change");
5	$(".mobile-close").toggleClass("change");
6}
7function starRating() {
8	
9	let box = $('.rating-box'); 
10	let type = $(box).data("type");
11	let id = $(box).data("id");
12	let v = $(this).data("pos") * 2;	
13	votelock = $(box).data("votelock");
14	
15	if (votelock == "1") {
16		return;
17	}
18	
19	if (id == "") {
20		alert("No id");
21		return;
22	}
23	
24	$(box).data("votelock", "1");
25	
26	if (type == "set") { voteobj = { contentgroup: id, vote: v, ajax: 1 } }
27	else if (type == "model") { voteobj = { set: id, vote: v, ajax: 1 } }
28	else if (type == "dvd") { voteobj = { dvd: id, vote: v, ajax: 1 } }
29	else { alert("undefined type");	return;	}
30	$.get("vote.php", voteobj)
31	.done(function(data) {			
32		if (data != "done")	{
33			alert("There was an error recording your vote. Please try again later");
34			return;
35		}
36		
37		$(box).data("voted", 1);
38		$(box).data("rating", v);
39		$(box).data("votelock", "0");
40	})
41	.fail(function() {
42		alert("There was an error recording your vote. Please try again later");
43		$(box).data("votelock", "0");
44	});	
45	
46}
47function footerPos() {
48	let wh = $(window).height();
49	let hh = $("html").height();
50	let fh = $(".footer").height()
51	if (wh > hh) {
52		$(".footer").css({
53			"position": "fixed",
54			"top": wh - fh - 32,
55			"width": "100%"
56		})
57	} 
58}
59function dropDowns() {
60	const dropDowns = $(".dropdown");
61	dropDowns.each(function() {
62		const select = $(this).find(".select");
63		const arrow = $(this).find(".arrow");
64		const menu = $(this).find(".menu");
65		const menuItems = $(this).find(".menu li");
66		const selectTitle = $(this).find(".select-title");
67		select.on("click", function() {
68			select.toggleClass("select-clicked");
69			arrow.toggleClass("arrow-rotate");
70			menu.toggleClass("menu-open");
71		});
72		menuItems.each(function() {
73			$(this).on("click", function() {
74				selectTitle.text($(this).text()); 
75				select.removeClass("select-clicked");
76				arrow.removeClass("arrow-rotate");
77				menu.removeClass("menu-open");
78				menuItems.each(function() {
79					$(this).removeClass("active");
80				});
81				$(this).addClass("active");
82			});
83		});
84	});
85}
86// INITIALIZE
87$(".icon-hamburger").on("click", mobileMenuAnim);
88$(".mobile-close").on("click", mobileMenuAnim);
89$(".rating-voteable").on("click", starRating);
90$(document).ready(function() {
91	dropDowns();
92	// $(".main").attr("style", `min-height: calc(100vh - ${$(".footer").height()}px)`);
93});
94$(document).on("click", function(e) {	
95	let dropDowns = $(".dropdown");
96	if (!dropDowns.is(e.target) && dropDowns.has(e.target).length === 0) {
97		$(".select").removeClass("select-clicked");
98		$(".arrow").removeClass("arrow-rotate");
99		$(".menu").removeClass("menu-open");
100		$("#languages").data.active = 1;
101		$("#languages").removeClass("on");
102	}
103});
104$("#switcher").on("click", (e) => {
105    e.preventDefault();
106    let langBox = $("#languages");
107    if (langBox.data.active == 0) {
108        langBox.data.active = 1;
109        langBox.removeClass("on");
110    } else {
111        langBox.data.active = 0;
112        langBox.addClass("on");				
113    }
114});

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.