PageSourceSearch

https://www.kyoto-kankyo.net/dcms_media/js/site-top.js

js kyoto-kankyo.net collected 2026-10-04 22:08:09 UTC 3,064 bytes, 95 lines download raw bytes

1var lh = "";
2lh = location.href;
3if (lh.match(/dcmsadm/)) {
4
5	/****************************************************************/
6	/* editor */
7	/****************************************************************/
8	$('html').addClass('is-editor');
9
10} else {
11
12	$(function () {
13
14	function isMobile() {
15		var userAgent = window.navigator.userAgent.toLowerCase();
16		if (userAgent.indexOf('iphone') !== -1 || userAgent.indexOf('ipad') !== -1 || (userAgent.indexOf('android') !== -1 && userAgent.indexOf('mobile') !== -1)) {
17			return true;
18		}
19		return false;
20	}
21
22/****************************************************************/
23/* TOP MV Slider */
24/****************************************************************/
25var swiper = new Swiper('.js-fv-slider', {
26  direction: 'horizontal',
27  loop: true,
28  autoplay: {
29    delay: 6000,
30    disableOnInteraction: false,
31  },
32  effect: 'fade',
33  fadeEffect: {
34    crossFade: true
35  },
36  navigation: {
37    nextEl: '.swiper-button-next',
38    prevEl: '.swiper-button-prev',
39  },
40  speed: 800,
41  on: {
42    slideChange: function () {
43      var animTitleElements = document.querySelectorAll('.js-anim--title > *');
44      staggeredAnimation(animTitleElements);
45    },
46  },
47});
48
49/****************************************************************/
50/* TOP MV TEXT */
51/****************************************************************/
52function staggeredAnimation(elements) {
53  elements = Array.from(elements); // Convert NodeList to Array
54  var duration = 1; // Animation duration in seconds
55  var delay = 0.5; // Delay between animations in seconds
56
57  elements.forEach(function (element, index) {
58    var animationDelay = index * delay;
59    element.style.transition = 'opacity ' + duration + 's ' + animationDelay + 's, transform ' + duration + 's ' + animationDelay + 's';
60    element.style.opacity = '1';
61    element.style.transform = 'translateY(0)';
62  });
63}
64
65	});
66}
67
68
69
70/****************************************************************/
71/* CTA上部bg-○○のクラスあった場合 */
72/****************************************************************/
73const $layoutPageBlock = $("#dcms_layoutPageBlock");
74
75if ($layoutPageBlock.length && $layoutPageBlock.children().length > 0) {
76    const $lastChild = $layoutPageBlock.children().last();
77
78    // bg-で始まるクラスまたは-bgで終わるクラスを検索
79    const bgClass = Array.from($lastChild[0].classList).find(cls => cls.startsWith("bg-") || cls.endsWith("-bg"));
80
81    if (bgClass) {
82        $('#dcms_layoutPageBlockPasteArea').next().addClass('js-mt-none');
83    }
84}
85
86
87  const $tmpl01PageHero = $(".tmpl_01_page-hero");
88  const $nextSibling = $tmpl01PageHero.next(); // tmpl_01_page-heroの次の兄弟要素を取得
89
90  // bg-で始まるクラスまたは-bgで終わるクラスを検索
91  const bgClass = Array.from($nextSibling[0].classList).find(cls => cls.startsWith("bg-") || cls.endsWith("-bg"));
92
93  if (bgClass) {
94      $tmpl01PageHero.addClass('js-mb-none');
95  }

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.