PageSourceSearch

https://kodamaayumu.com/blog/wp-content/themes/isotype_001/assets/js/share.js

js kodamaayumu.com collected 2026-10-05 19:34:24 UTC 3,893 bytes, 130 lines download raw bytes

1$(function(){
2    objectFitImages('.thumb img');
3
4
5    let scrollmargin = 50;
6
7
8    setTimeout(function() {
9        $('#loading').fadeOut(300);
10        
11    }, 1500);
12
13    $(window).on('load', function(){
14
15        $('#loading').fadeOut(300);
16
17
18    });
19
20
21    $(window).on('load resize', function(){
22        if(window.matchMedia('(max-width:1024px)').matches){
23            $('.first_header').removeClass('open');
24            $('.first_header').find('#logo').prependTo('#global');
25            //$('.first_header').find('#sns').insertBefore('#navclose');
26
27            $('.main_header').removeClass('open');
28            //var global = $('.main_header').find('#global');
29            //var navclose = $('.main_header').find('#navclose');
30
31            //$('.main_header').find('#logo').prependTo(global);
32            //$('.main_header').find('#sns').insertBefore(navclose);
33
34        }else{
35        	$('.first_header').find('#logo').insertAfter('#global');
36        	$('.first_header').find('#sns').insertAfter('#catchcopy');
37
38        	//var global = $('.main_header').find('#global_main');
39            var catchcopy = $('.main_header').find('#catchcopy');
40
41        	//$('.main_header').find('#logo').prependTo(global);
42        	$('.main_header').find('#sns').insertAfter(catchcopy);
43        }
44        //scrollmargin = $('#header').innerHeight();
45        //$('#header + *').css('margin-top', scrollmargin);
46    });
47
48
49	$(document).on('touchend click', '#open, #navclose', function(event){
50		event.preventDefault();
51		//console.log($(this).parent());
52        if($(this).parents('.main_header').hasClass('open-menu')){
53        	$(this).parents('.main_header').removeClass('open-menu');
54        }else{
55        	$(this).parents('.main_header').addClass('open-menu');
56        }
57        $(this).parents('.main_header .search').removeClass('open-menu');
58    });
59
60
61    $('#nav li a').filter(function(){
62        return $(this).prop('href')==location.href
63    }).parents('li').addClass('on');
64
65
66    $('.search').each(function(){
67        const search = this;
68        $('.searchbtn', search).on('touchend click', function(event){
69            event.preventDefault();
70            $('.main_header').removeClass('open');
71            if($(search).hasClass('open')){
72                $(search).removeClass('open');
73            }else{
74                $(search).addClass('open');
75            }
76        });
77    });
78
79
80	$(document).on('click','a[href*="#"]',function(){
81        if(location.pathname.replace(/^\//,'') === this.pathname.replace(/^\//,'') && location.hostname === this.hostname){
82            var target = $(this.hash);
83            target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
84            if(target.length){
85                $('html,body').stop().animate({scrollTop: target.offset().top - scrollmargin}, 500, 'swing');
86                return false;
87            }
88        }
89    });
90
91
92    $('header').addClass('animated fast');
93    $('section').addClass('animated');
94    $('header, section').on('inview', function(event, isInView){
95        if(isInView){
96            $(this).addClass('fadeIn');
97        }
98    });
99
100
101    $('.moveline').on('inview', function(event, isInView){
102        if(isInView){
103            $(this).addClass('on');
104        }
105    });
106
107
108    $('select').wrap('<div class="selectbox"></div>');
109
110
111	$('.accordion dt').on('touchend click', function(event){
112		event.preventDefault();
113		$(this).toggleClass('on').next().slideToggle(200);
114	});
115
116
117    $('.tabcontents').each(function(){
118        let tabcontents = this;
119        $('.tab li', tabcontents).on('touchend click', function(event){
120            event.preventDefault();
121            const index = $(this).index();
122            $('.tab li', tabcontents).removeClass('on');
123            $(this).addClass('on');
124            $('.tabcontent', tabcontents).hide().eq(index).fadeIn(300);
125        }).filter(':eq(0)').click();
126    });
127
128
129
130});

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.