PageSourceSearch

https://www.hometownstation.com/wp-content/plugins/sugar-calendar/assets/js/sc-ajax.js

js hometownstation.com collected 2026-10-02 04:07:03 UTC 1,522 bytes, 56 lines download raw bytes

1jQuery(document).ready(function($) {
2	$('body').on('submit', '.sc_events_form', function() {
3
4		document.body.style.cursor = 'wait';
5		if( $(this).attr('id') == 'sc_event_select' ) {
6			var calendar = $(this).parent().parent().parent().attr('id');
7		} else {
8			var calendar = $(this).parent().parent().parent().parent().attr('id');
9		}
10		var data = $(this).serialize();
11	    $.post(sc_vars.ajaxurl, data, function (response) {
12	   		$('#' + calendar).html(response);
13			scResizeCal();
14	 	}).done(function() {
15	 		document.body.style.cursor = 'default';
16	 	});
17		return false;
18	});
19
20	function scResizeCal() {
21		var winwidth = $(window).width();
22		var winheight = $(window).height();
23
24		if(winwidth <= 480) {
25			$('#sc_calendar th').each(function() {
26				if( $(this).text().length > 3 ) {
27					var day = $(this).text().substr(0, 3);
28					$(this).text(day);
29				}
30			});
31			if( ! $('.sc_events_calendar').hasClass('sc_small') ) {
32				$('#sc_event_select').hide();
33				$('#sc_event_nav_wrap').css('width', '50%');
34				$('#sc_event_select').css('width', '50%');
35			} else {
36				$('#sc_event_select').show();
37				$('#sc_event_nav_wrap').css('width', '100%');
38				$('#sc_event_select').css('width', '100%');
39			}
40		} else {
41			$('#sc_event_select').show();
42			if( ! $('.sc_events_calendar').hasClass('sc_small') ) {
43				$('#sc_event_nav_wrap').css('width', '33%');
44				$('#sc_event_select').css('width', '33%');
45			}
46		}
47	}
48
49	// resize on load if needed
50	scResizeCal();
51
52	$(window).resize(function() {
53		scResizeCal();
54	});
55
56});

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.