PageSourceSearch

https://www.toyokawa-map.net/js/my-top.js?1790923664

js toyokawa-map.net collected 2026-10-02 07:19:39 UTC 3,997 bytes, 143 lines download raw bytes

1// javascript
2// トップページ
3
4var base_dir = '';
5
6$(function() {
7  //
8  var swiper_mv = new Swiper('#main_visula_slider', {
9    autoplay: {
10      delay: 4000
11    },
12    speed: 2000,
13    effect: 'fade',
14    loop: true,
15  });
16
17  // RECOMMENDED
18  var swiper1 = new Swiper('#recommended_slider', {
19    autoplay: {
20      delay: 4000
21    },
22    spaceBetween: 0,
23    loop: true,
24    centeredSlides: true,
25    slidesPerView: 1.4,
26
27    breakpoints: {
28      768: {
29        centeredSlides: false,
30        slidesPerView: 2
31      },
32      992: {
33        centeredSlides: false,
34        slidesPerView: 3
35      }
36    },
37
38    pagination: {
39      el: '.swiper-pagination', //ページネーションの要素
40      type: 'bullets', //ページネーションの種類
41      clickable: true, //クリックに反応させる
42    },
43    //ナビゲーションボタン(矢印)表示の設定
44    navigation: {
45      nextEl: '.swiper-button-next', //「次へボタン」要素の指定
46      prevEl: '.swiper-button-prev', //「前へボタン」要素の指定
47    },
48    paginationClickable: true,
49  });
50
51  // 協賛企業
52  var swiper3 = new Swiper('#sponsor_banner_slider', {
53    autoplay: {
54      delay: 6000
55    },
56    spaceBetween: 0,
57    loop: true,
58    slidesPerView: 1,
59
60    breakpoints: {
61      768: {
62        slidesPerView: 3
63      },
64      992: {
65        slidesPerView: 5
66      }
67    },
68
69    pagination: {
70      el: '.swiper-pagination', //ページネーションの要素
71      type: 'bullets', //ページネーションの種類
72      clickable: true, //クリックに反応させる
73    },
74    //ナビゲーションボタン(矢印)表示の設定
75    navigation: {
76      nextEl: '.swiper-button-next', //「次へボタン」要素の指定
77      prevEl: '.swiper-button-prev', //「前へボタン」要素の指定
78    },
79    paginationClickable: true,
80  });
81
82  getMedia('#instagram_list', 6, 1);
83});
84
85
86
87//----- Instagram投稿データの取得 -----
88//id : 表示するHTML要素
89//max_data : 最大表示件数
90//video_style : ビデオの場合の表示方法(1:動画として表示 2:静止画サムネイルを代替表示)
91function getMedia(id, max_data, video_style) {
92	$.ajax({
93		url					: './get_instagram_media.php' ,
94		type				: 'GET' ,
95		cache				: false ,
96		dataType		: 'json'
97	}).done(function(json){
98		if (json.status == 'success') {
99			var tag = '<ul>';
100			if (json.data) {
101				for(i=0; i<json.data.length; i++) {
102					if (i == max_data) break;
103					var row = json.data[i];
104					tag += ('<li><a href="' + row.permalink + '" target="_blank" title="' + row.caption + '">');
105					if (row.media_type == 'VIDEO') {
106					console.log('row.thumbnail_url[' + row.thumbnail_url + ']');
107						if (video_style == 1 || row.thumbnail_url === undefined) {
108							tag += ('<video src="' + row.media_url + '" autoplay muted playsinline loop></video>');
109						}
110						else {
111							tag += ('<img src="' + row.thumbnail_url + '" />');
112						}
113					}
114					else {
115						tag += ('<img src="' + row.media_url + '" />');
116					}
117					tag += ('</a></li>');
118				}
119			}
120			tag +=('</ul>');
121			$(id).html(tag);
122		}
123		else {
124			$('#instagram_sample').html('<span class="text-muted">取得できません</span>');
125			if (json.instagram_error !== undefined) {
126				$('#instagram_sample').html(json.instagram_error);
127			}
128			else {
129				if (json.reason == 'curl_init_failed') {
130					$('#instagram_sample').html('このサーバーではcURLが使用できません。サーバー管理者にお問合せください。');
131				}
132				else if (json.reason == 'instagram_token_refresh_faild') {
133					$('#instagram_sample').html('長期アクセストークンの更新に失敗しました。サーバー管理者にお問合せください。');
134				}
135				else {
136					console.log(json.reason);
137				}
138			}
139		}
140	}).fail(function(jqXHR, textStatus, errorThrown) {
141		console.log('[getMedia] jqXHR.status[' + jqXHR.status + '] textStatus[' + textStatus + ']  errorThrowm[' + errorThrown + ']');
142	});
143}

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.