PageSourceSearch

https://princetonlibrary.org/wp-content/themes/site-theme-child-astra-ppl/assets/js/main.js?ver=1.1.9

js princetonlibrary.org collected 2026-10-02 04:03:36 UTC 2,482 bytes, 88 lines download raw bytes

1
2var $=jQuery.noConflict();
3
4function createCookie(name,value,days) {
5	if (days) {
6		var date = new Date();
7		date.setTime(date.getTime()+(days*24*60*60*1000));
8		var expires = "; expires="+date.toGMTString();
9	}
10	else var expires = "";
11	document.cookie = name+"="+value+expires+"; path=/";
12}
13
14function readCookie(name) {
15	var nameEQ = name + "=";
16	var ca = document.cookie.split(';');
17	for(var i=0;i < ca.length;i++) {
18		var c = ca[i];
19		while (c.charAt(0)==' ') c = c.substring(1,c.length);
20		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
21	}
22	return null;
23}
24
25function eraseCookie(name) {
26	createCookie(name,"",-1);
27}
28
29$(document).ready( function(){ 
30
31	// Search
32	$('#optionsRadios1').click(function(e) {
33		$('#searchform').attr('action', 'https://princetonlibrary.bibliocommons.com/search');
34	});
35
36	$('#optionsRadios2').click(function(e) {
37		$('#searchform').attr('action', '/');
38	});
39	
40	$('#optionsRadios3').click(function(e) {
41		$('#searchform').attr('action', 'https://princetonlibrary.libnet.info/events');
42	});
43	
44	$('#searchform').submit(function(e) {
45		e.preventDefault();
46		$('#s').val($('#custom_query').val());
47		$('#term').val($('#custom_query').val());
48		
49		if ($('input[name=optionsRadios]:checked', '#searchform').val() == "events") {
50			$('#s').remove();
51			$('#custom_query').remove();
52			$('input[name=optionsRadios]').remove();
53		}
54		 $(this).unbind('submit').submit();
55	});
56	// Search
57
58	// Mobile Search
59// 	$('#optionsRadios1_mobile').click(function(e) {
60// 		$('#searchform_mobile').attr('action', 'https://princetonlibrary.bibliocommons.com/search');
61// 	});
62// 
63// 	$('#optionsRadios2_mobile').click(function(e) {
64// 		$('#searchform_mobile').attr('action', '/');
65// 	});
66// 	
67// 	$('#optionsRadios3_mobile').click(function(e) {
68// 		$('#searchform_mobile').attr('action', 'https://princetonlibrary.libnet.info/events');
69// 	});
70// 	
71// 	$('#searchform_mobile').submit(function() {
72// 		$('#s_mobile').val($('#custom_query_mobile').val());
73// 		$('#term_mobile').val($('#custom_query_mobile').val());
74// 
75// 		e.preventDefault();
76// 		$('#s_mobile').val($('#custom_query').val());
77// 		$('#term_mobile').val($('#custom_query').val());
78// 		
79// 		if ($('input[name=optionsRadios]:checked', '#searchform_mobile').val() == "events") {
80// 			$('#s_mobile').remove();
81// 			$('#custom_query_mobile').remove();
82// 			$('input[name=optionsRadios]').remove();
83// 		}
84// 		 $(this).unbind('submit').submit();
85// 	});
86	// Mobile Search
87
88});	

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.