PageSourceSearch

https://ikkon-movie.com/common/common.js

js ikkon-movie.com collected 2026-10-06 14:07:42 UTC 4,616 bytes, 154 lines download raw bytes

1let firstRun;//初回訪問
2let firstVideo = true;//初回再生
3let player;//プレイヤー
4
5$(function () {
6	if ((navigator.userAgent.indexOf('iPhone') > 0 && navigator.userAgent.indexOf('iPad') == -1) || navigator.userAgent.indexOf('iPod') > 0 || navigator.userAgent.indexOf('Android') > 0) {
7		//
8	} else {
9
10		/* COOKIE */
11		let cook;       //cookieデータを格納する変数
12		let START, END;  //訪問回数部分を切取る為の位置を格納
13		let cnt;        //訪問回数を格納
14
15		cook = document.cookie + ";"; //変数cookにcookieデータを入れる
16		START = cook.indexOf("counts=", 0); 	//変数STARTにカウントデータの最初の位置を入れる
17
18		//データの有無で分岐
19		if (START == -1) {
20			document.cookie = "counts=1;"; //cookieに訪問回数=1を書き込む
21			firstRun = true;
22		} else {
23			firstRun = false;
24			END = cook.indexOf(";", START); //カウントデータの最後の部分「;」の位置を取得
25			cnt = cook.substring(START + 7, END); //数値の部分だけを切り取る
26
27			//数値に変換できない例外が出た時の処理
28			try {
29				cnt = parseInt(cnt) + 1; //取得した回数に+1して表示する
30				//alert(cnt+"回目の訪問です!");
31				document.cookie = "counts=" + cnt + ";"; //cookieに訪問回数を書き込む
32			} catch (e) {
33				//alert("訪問回数の取得に失敗しました。");
34			}
35		}
36
37		let idname = $('body').attr("id");
38		if (idname == "home" && firstRun) { trailerShow() };
39
40		$('.nav04 img').click(function () {
41			trailerShow();
42			return false;
43		});
44
45		//ボタン切り替え
46		$('nav a img, .link a img').hover(function () {
47			$(this).attr('src', $(this).attr('src').replace('_off', '_on'));
48		}, function () {
49			$(this).attr('src', $(this).attr('src').replace('_on', '_off'));
50		});
51		$('.nomitomo').hover(function () {
52			$('.credit08 img').attr('src', $('.credit08 img').attr('src').replace('_off', '_on'));
53		}, function () {
54			$('.credit08 img').attr('src', $('.credit08 img').attr('src').replace('_on', '_off'));
55		});
56
57		//home
58		$('.cast-area a img').hover(function () {
59			$(this).fadeTo(500, 0.75);
60		}, function () {
61			$(this).fadeTo(500, 1);
62		});
63	}
64});
65
66//動画サイズ
67let videoWidth = 889;
68let videoHeight = 500;
69let youtubeVideoID = "F8JO6GHVijg";
70
71//予告編表示
72function trailerShow() {
73	if (firstVideo) {
74		$('body').append('<div id="trailer"><div id="iframe_player_api"></div><p class="close"><img src="images/btn_close.png" width="104" height="26" alt="予告編を閉じる"></p></div>');
75		$('#iframe_player_api, #trailer .close').fadeTo(0, 0);
76		$('#trailer, #trailer .close img').click(function () { trailerClose(); return false; });
77		$('#trailer .close img').hover(function () {
78			$(this).fadeTo(100, 0.5);
79		}, function () {
80			$(this).fadeTo(100, 1);
81		});
82
83		//「IFrameプレーヤーAPI」のコードを読み込む。
84		let tag = document.createElement('script');
85		tag.src = "https://www.youtube.com/iframe_api";
86		let iframePlayerApiScriptTag = document.getElementsByTagName('script')[0];
87		iframePlayerApiScriptTag.parentNode.insertBefore(tag, iframePlayerApiScriptTag);
88	} else {
89		$('#iframe_player_api, #trailer .close').fadeTo(0, 0);
90		$('#trailer').show();
91		player.seekTo(0);
92		$('#iframe_player_api, #trailer .close').fadeTo(500, 1);
93		player.playVideo();
94	}
95}
96
97function onYouTubePlayerAPIReady() {
98	//<iframe>タグに置き換え
99	player = new YT.Player('iframe_player_api', {
100		//動画プレーヤーのサイズ,ID
101		width: videoWidth,
102		height: videoHeight,
103		videoId: youtubeVideoID,
104		//パラメータ
105		playerVars: {
106			'modestbranding': 1,
107			'autohide': 1,
108			'controls': 1,
109			'showinfo': 0,
110			'rel': 0,
111			'autoplay': 0,
112			'fs': 0
113		},
114		//「イベントリスナー」
115		events: {
116			'onReady': onPlayerReady,
117			'onStateChange': onPlayerStateChange
118		}
119	});
120};
121
122//動画を再生する準備が整ったときに実行される関数
123function onPlayerReady() {
124	player.seekTo(0);
125	$('#iframe_player_api, #trailer .close').fadeTo(500, 1);
126	player.playVideo();
127	firstVideo = false;
128	return false;
129};
130
131//動画の再生状態が変わったときに実行される関数
132function onPlayerStateChange(event) {
133	switch (event.data) {
134		case YT.PlayerState.ENDED:
135			trailerClose();
136			break;
137		case YT.PlayerState.PAUSED:
138		case YT.PlayerState.PLAYING:
139		case YT.PlayerState.BUFFERING:
140		case YT.PlayerState.CUED:
141			break;
142		default:
143			break;
144	};
145};
146
147function trailerClose() {
148	$('#iframe_player_api').fadeTo(500, 0);
149	player.stopVideo();
150	$('#trailer').fadeOut(100, function () {
151		$('#trailer').hide();
152	});
153
154};

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.