PageSourceSearch

https://portal.kuroshitsuji.tv/assets/js/jquery.common.js

js kuroshitsuji.tv collected 2026-10-02 03:39:10 UTC 4,661 bytes, 194 lines download raw bytes

1const aspect=16/9;
2const mediaQueryList=window.matchMedia('(min-width:769px)');
3var wWidth;
4//Anchor Smooth Scroll
5$(".js-anchor").on('click',function(){
6	var speed=1000;
7	var href=$(this).attr("href");
8	var target=$(href=="#"||href==""?'html':href);
9	var position=target.offset().top;
10	$('body,html').animate({scrollTop:position},speed,'easeOutQuart');
11	return false;
12});
13//Menu
14$(".js-menu").on('click',function(){
15	$(this).toggleClass('is-active');
16	if($(this).hasClass('is-active')){
17		$("#js-navContInner").addClass('is-active');
18	} else {
19		$("#js-navContInner").removeClass('is-active');
20	}
21});
22var swiper;
23$(function(){
24	if($("iframe[src*=youtu]")[0]){
25		$("iframe[src*=youtu]").each(function(){
26			$(this).wrapAll('<div class="youtube__wrap"></div>')
27		});
28	}
29});
30function movieSize(){
31	var mWidth=$(".js-movie").innerWidth();
32	var mHeight=$(".js-movie").innerHeight();
33	if(aspect>mWidth/mHeight){
34		$(".js-movieInner").css({'width':mHeight*aspect+'px','height':mHeight+'px'})
35	}else{
36		$(".js-movieInner").css({'width':mWidth+'px','height':mWidth/aspect+'px'})
37	}
38}
39function movie(_ytid){
40	$("#js-modalMovie iframe").attr('src','https://www.youtube.com/embed/'+_ytid+'?autoplay=1&rel=0');
41	$("html,body").css({'overflow':'hidden'});
42	$("#movieModal").fadeIn(500);
43	player.pauseVideo();
44}
45function modalMovieSize(){
46	wWidth=$(window).innerWidth();
47	wHeight=$(window).innerHeight();
48	if(wWidth>768){
49		var ofsWidth=80;
50		var ofsHeight=80;
51	}else{
52		var ofsWidth=0;
53		var ofsHeight=wWidth*0.128;
54	}
55	if(16/9>(wWidth-ofsWidth*2)/(wHeight-ofsHeight*2)){
56		$("#js-modalMovie").css({'width':(wWidth-ofsWidth*2)+'px','height':(wWidth-ofsWidth*2)/(16/9)+'px'});
57	}else{
58		$("#js-modalMovie").css({'width':(wHeight-ofsHeight*2)*(16/9)+'px','height':(wHeight-ofsHeight*2)+'px'});
59	}
60}
61$(window).on('load resize',$.debounce(500,function(){
62	movieSize();
63	modalMovieSize();
64	wWidth=$(window).innerWidth();
65}));
66$(".js-movieClose").on('click',function(){
67	$("html,body").attr('style','');
68	$("#movieModal").fadeOut(500,'linear',function(){
69		$('#js-modalMovie iframe').attr('src','');
70		player.mute();
71		player.playVideo();
72	});
73});
74/**
75 * Cursor
76 */
77var cursor=$(".playbtn");
78var delay=10;
79var mouseX=0;
80var mouseY=0;
81var posX=0;
82var posY=0;
83TweenMax.to({},.001,{
84	repeat:-1,
85	onRepeat:function(){
86		if(wWidth>768){
87			posX+=(mouseX-posX)/delay;
88			posY+=(mouseY-posY)/delay;
89			TweenMax.set(cursor,{
90				css:{
91					left:posX,
92					top:posY
93				}
94			});
95		}
96	}
97});
98$(document).on("mousemove",function(e){
99	if(wWidth>768){
100		mouseX=e.clientX;
101		mouseY=e.clientY;
102	}
103});
104//Cursor on
105$(".js-movie").on({
106	"mouseenter":function(){
107		cursor.addClass("is-link");
108	},
109	"mouseleave":function(){
110		cursor.removeClass("is-link");
111	}
112});
113const listener=(event)=>{
114	if (event.matches){
115		$.ajax({
116			type:"GET",
117			url:"https://platform.twitter.com/widgets.js",
118			dataType:"script"
119		});
120	}
121};
122
123$(window).on('load',function(){
124	$(".aniBoxin").each(function(i,v){
125		setTimeout(()=>{
126			$(this).addClass('on');
127		},i*100);
128	});
129	setTimeout(()=>{
130		if(('#js-carouselSwiper')[0]){
131			swiper=new Swiper('#js-carouselSwiper',{
132				effect:'fade',
133				fadeEffect:{
134					crossFade:true
135				},
136				autoplay:{
137					delay:5000,
138					disableOnInteraction:false,
139				},
140				on:{
141					afterInit:function(){
142						$("#js-carouselProgBar").addClass('st');
143					},
144					slideChangeTransitionStart:function(){
145						$("#js-carouselProgBar").removeClass('st');
146					},
147					slideChangeTransitionEnd:function(){
148						$("#js-carouselProgBar").addClass('st');
149					},
150				},
151				loop:true,
152			});
153		}
154	},500);
155})
156mediaQueryList.addEventListener("change",listener);
157listener(mediaQueryList);
158
159
160
161/**
162 * Youtube modal
163 */
164function youtubeModal(_ytid, _ytTime) {
165	$('#js-youtubeModal').fadeIn(500);
166	$('body').css({'overflow':'hidden'});
167	let ytURL = 'https://www.youtube.com/embed/'+_ytid+'?autoplay=1&rel=0';
168	if(_ytTime){
169		ytURL = ytURL + '&amp;start=' + _ytTime;
170	}
171	setTimeout(function(){
172		$('.js-youtubeIframe').attr('src',ytURL);
173	},100);
174}
175
176// Close
177function youtubeModalClose() {
178	$('#js-youtubeModal').fadeOut(500);
179	$('body').css({'overflow':''});
180
181	setTimeout(function(){
182		$('.js-youtubeIframe').attr('src','');
183	},500);
184}
185
186// Close - クリックイベント
187$('.js-youtubeModalIn').on('click touchend', function(e) {
188	if (!$(e.target).closest('.js-youtubeModalIn__cont').length) {
189		youtubeModalClose();
190	}
191});
192$('.js-youtubeModal-close').on('click', function() {
193	youtubeModalClose();
194});

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.