PageSourceSearch

https://st-shika.com/js/main.js

js st-shika.com collected 2026-10-04 15:11:26 UTC 1,897 bytes, 57 lines download raw bytes

1(function($) {
2 
3function setimage(){
4// 設定
5var $height =$(window).height(1); // 高さ
6var $width =$(window).width(); // 幅
7var win_ratio = $width / $height;
8 
9$(".Opening").css({"height":$height});
10$(".Opening ul li").css({"height":$height});
11 
12if (win_ratio > 1.5){ //画像の比率が大きかったら
13  $(".Opening ul li img.Opening__img").css({"width":"100%","height":"auto","margin-left":0});
14  var winwidth = $(".Opening").width();
15  var imgheight = winwidth*0.66;
16  var winheight = $(".Opening").height();
17  var imgtopmargin = (imgheight-winheight)/2;
18  $(".Opening ul li img.Opening__img").css({"margin-top":-imgtopmargin});
19}else if (win_ratio < 1.5){ //画像の比率が小さかったら
20  var imgwidth = (($height/800))*1200;
21  var winwidth = $(".Opening").width();
22  var imgmargin = (winwidth-imgwidth)/2;
23  $(".Opening ul li img.Opening__img").css({"width":imgwidth,"height":$height,"margin-left":imgmargin,"margin-top":0});
24}
25}
26 
27  //slide
28$(function(){
29setimage();
30var $interval = 3000; // 切り替わりの間隔(ミリ秒)
31var $fade_speed = 2000; // フェード処理の早さ(ミリ秒)
32$(".Opening ul li").hide().css({"position":"absolute","top":0,"left":0});
33$(".Opening ul li:first").addClass("active").show();
34setInterval(function(){
35var $active = $(".Opening ul li.active");
36var $activeafter = $(".Opening ul li.active:after");
37var $next = $active.next("li").length?$active.next("li"):$(".Opening ul li:first");
38//$active.fadeOut($fade_speed,function(){$active.removeClass("active");});
39$active.fadeOut($fade_speed);
40$active.removeClass("active");
41$next.fadeIn($fade_speed).addClass("active");
42
43},$interval);
44});
45//resi
46var timer = false;
47$(window).resize(function() {
48    if (timer !== false) {
49        clearTimeout(timer);
50    }
51    timer = setTimeout(function() {
52        console.log('resized');
53        setimage();
54    }, 200);
55});
56 
57})(jQuery);

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.