PageSourceSearch

https://ini-official.com/static/original/fanclub/js/common.js

js ini-official.com collected 2026-10-02 15:02:15 UTC 2,076 bytes, 91 lines download raw bytes

1setTimeout(function() {
2    if (document.getElementsByTagName("html")[0].classList.contains('wf-active') != true) {
3        document.getElementsByTagName("html")[0].classList.add('loading-delay');
4    }
5}, 2000);
6
7// loaded
8function loaded(){
9  $(window).load(function(){
10    setTimeout(function(){
11      $('body').addClass('loaded');
12    },500);
13  });
14}
15
16// anchor
17function anchor() {
18  $('a[href^="#"]').click(function () {
19    var Hash = $(this.hash),
20      $Hash = $(Hash);
21    if ($Hash.length > 0) {
22      var HashOffset = $Hash.offset().top;
23      $('html,body').animate({
24        scrollTop: HashOffset
25      }, 600);
26    }
27    return false;
28  });
29}
30
31// scroll
32function scroll(){
33  var windowHeight = $('html, body').height();
34	$(window).on('scroll', function() {
35    if ($(this).scrollTop() > windowHeight) {
36      $('body').addClass('scroll');
37    }else{
38      $('body').removeClass('scroll');
39    }
40	});
41}
42
43// drawer
44function drawer() {
45	$('.drawer__btn').on('click',function(){
46		$('body').toggleClass('is-drawer-shown');
47    $('header').toggleClass('is-open');
48	});
49  
50  $('.gnav .sub').parent('li').hover(function(){
51    $(this).addClass('hover');
52    $(".sub",this).stop(true, true).fadeIn('fast');
53    $(".sub",this).parents('.gnav').addClass('on');
54  }, function(){
55    $(this).removeClass('hover');
56    $(this).parents('.gnav').removeClass('on');
57    $(".sub",this).stop(true, true).fadeOut('fast');
58  });  
59  
60}
61
62// greeting
63function greeting(){
64	$('.langBar button').on('click',function(){
65		$('.langBar form input').remove();
66		var l = $(this).val();
67		if( $('body').hasClass('page--home')){
68
69			$('body').removeClass('en ja zh-tw').addClass('greeting '+l);
70			setTimeout(function(){
71				$('.langBar form').prepend($('<input/>', {type: 'hidden', name: 'lang', value: l})).submit();
72				return false;
73			},200);
74		}else{
75			$('.langBar form').prepend($('<input/>', {type: 'hidden', name: 'lang', value: l})).submit();
76		}
77	});
78}
79
80$(function(){
81	anchor();
82	scroll();
83	loaded();
84  drawer();
85  greeting();
86});
87
88$(window).resize(function() {
89    scroll();
90});
91

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.