PageSourceSearch

https://www.ncsm.city.nagoya.jp/module/calendar.js

js city.nagoya.jp collected 2026-10-01 10:23:29 UTC 1,191 bytes, 48 lines download raw bytes

1$(function() {
2	loadJS('/module/calendar/jquery-ui.min.js');
3	loadJS('/module/calendar/datepicker-ja.js');
4	getCalendarJson();
5});
6
7function getCalendarJson()
8{
9	let xhr = new XMLHttpRequest();
10	xhr.addEventListener('load', function()
11	{
12		let json = JSON.parse(xhr.response);
13		setCalendar( json["events"], json["settings"]);
14	});
15	xhr.open('GET', '/module/calendar/calendar.json');
16	xhr.setRequestHeader('Content-Type', 'application/json charset=utf-8');
17	xhr.send();
18}
19
20function setCalendar(events, settings)
21{
22	$(".datepicker").datepicker({
23		minDate: new Date(settings["minCalendarDate"]),
24		maxDate: new Date(settings["maxCalendarDate"]),
25		beforeShowDay: function(day) {
26			day = $.datepicker.formatDate('yy/mm/dd', day);
27			let daySetting = events[day] != undefined ? 
28				events[day] : [true, "", ""];
29			return daySetting;
30		}
31	});
32}
33
34function loadJS(url)
35{
36	let element = document.createElement('script');
37	element.src = url;
38	document.body.appendChild(element);
39}
40
41function loadCSS(url)
42{
43	let element = document.createElement('link');
44	element.href = url;
45	element.rel = 'stylesheet';
46	element.type = 'text/css';
47	document.getElementsByTagName('head')[0].appendChild(element);
48}

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.