PageSourceSearch

https://kaorinomori.jp/wp-content/themes/kaorinomori/js/common.js?v=1791509260

js kaorinomori.jp collected 2026-10-09 01:27:48 UTC 1,980 bytes, 67 lines download raw bytes

1// TouchDevice
2function isTouchDevice() {
3  var result = false;
4  if (window.ontouchstart === null) {
5    result = true;
6  }  
7  return result;
8}
9//Load
10$(window).on('load',function(){
11	$('body').addClass('is-loaded');
12});
13//Scroll
14var scrollFlag = '';
15function scrollSearch() {
16	var scrollPosition = $(window).scrollTop();
17	var showPosition = $('header').find('.above-inner').outerHeight();
18	if(scrollPosition < showPosition && scrollFlag != 'min') {
19    scrollFlag = 'min';
20    $('body').removeClass('is-scroll');
21    $('#wrapper').css('paddingTop','');
22  } else if(scrollPosition >= showPosition && scrollFlag != 'over') {
23    scrollFlag = 'over';
24    $('body').addClass('is-scroll');
25    $('#wrapper').css('paddingTop',$('header').find('nav').outerHeight());
26  }
27}
28var toggleHeaderFlag = '';
29function toggleHeader() {
30  var scrollPosition = $(window).scrollTop();
31  var togglePosition = $('footer').offset().top - $(window).height() + parseInt($('footer').css('paddingTop')) - 20;
32  if(scrollPosition < togglePosition && togglePosition != 'min') {
33    togglePosition = 'min';
34    $('body').removeClass('header-hidden');
35  } else if(scrollPosition >= togglePosition && togglePosition != 'over') {
36    togglePosition = 'over';
37    $('body').addClass('header-hidden');
38  }
39}
40$(window).on('load scroll',function(){
41  if($(window).width() >= 768) {
42    scrollSearch();
43  }
44  toggleHeader();
45});
46function contentsMinHeight() {
47  $('#contents').css('minHeight',$(window).height());
48}
49$(function(){
50  contentsMinHeight();
51});
52var winW = $(window).width();
53$(window).on('resize',function(){
54  if(winW != $(window).width()) {
55    contentsMinHeight();
56    winW = $(window).width()
57  }
58});
59//LazySizes
60window.lazySizesConfig = window.lazySizesConfig || {};
61window.lazySizesConfig.preloadAfterLoad = true;
62window.lazySizesConfig.customMedia = {
63  '--sp': '(max-width: 768px)',
64  '--pc': '(min-width: 769px)',
65  '--full': '(min-width: 1367px)',
66  '--portrait': '(orientation: portrait)',
67};

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.