PageSourceSearch

https://chainavi.cn/js/share.js

js chainavi.cn collected 2026-10-07 08:46:45 UTC 7,527 bytes, 202 lines download raw bytes

1//useragent
2var flag = (function () {
3    if (navigator.userAgent.indexOf('iPhone') != -1 || navigator.userAgent.indexOf('iPod') != -1 || navigator.userAgent.indexOf('iPad') != -1 || ( navigator.userAgent.indexOf('Android') != -1 )) {
4        if (navigator.userAgent.indexOf('iPhone') != -1 || navigator.userAgent.indexOf('iPod') != -1 || ( navigator.userAgent.indexOf('Android') != -1 && navigator.userAgent.indexOf('Mobile') != -1 )) {
5            return "sp";
6        } else if (navigator.userAgent.indexOf('iPad') != -1 || ( navigator.userAgent.indexOf('Android') != -1 && navigator.userAgent.indexOf('Mobile') < 0 )) {
7            return "tab";
8        }
9    } else {
10        return "pc";
11    }
12})();
13
14(function ($) {
15  var share = $.share = (function () {
16    function init() {
17          
18      spMenu();  
19
20      if (flag == "pc") {
21                // ロールオーバー関数
22        $('[class!=current] > a').on({
23          'mouseenter': function () {
24            if ($(this).find("img[src*='_off.']").size() > 0) $(this).find("img:not(.current)").attr("src", $(this).find("img").attr("src").replace("_off.", "_on."));
25            else if ($(this).find("img:not(.current)").size() > 0 && !$(this).hasClass("bg_hover") && !$(this).hasClass("hover_none")) $(this).find("img").css("opacity", "0.5");
26          },
27          'mouseleave': function () {
28            if ($(this).find("img[src*='_on.']").size() > 0) $(this).find("img:not(.current)").attr("src", $(this).find("img").attr("src").replace("_on.", "_off."));
29            else if ($(this).find("img:not(.current)").size() > 0 && !$(this).hasClass("bg_hover")) $(this).find("img").css("opacity", "1");
30          }
31        });
32      }
33
34      function spMenu() {
35        var $menuBtn = $(".header_sp .menu");
36        var $nav = $(".header_sp .nav_area");
37        var $menuBtn01 = $(".header_sp .nav > li > span");
38        var $menuBtn02 = $(".header_sp .nav .sub_list span");
39        var $searchBtn = $(".header_sp .btn_search,.header_sp .place");
40
41        $menuBtn.on("click",function(){
42          $nav.stop().slideToggle();
43          $menuBtn.toggleClass("open");
44          $(".header_sp .nav li").removeClass("prev");
45          $(".header_sp .nav > li").css("display","block");
46          $(".header_sp .nav li .sub_list").css("display","none");
47          $(".header_sp .nav li .list").css("display","none");
48          $searchBtn.removeClass('open');
49          $searchBtn.next().hide();
50        });
51        $menuBtn01.on("click",function(){
52          if($(this).parent("li").hasClass('prev')){
53            $(this).parents(".nav").children("li").css("display","block");
54            $(this).parent("li").css("display","block").removeClass("prev");
55            $(this).next().css("display","none");
56          }else{
57            $(this).parents(".nav").children("li").css("display","none");
58            $(this).parent("li").css("display","block").addClass("prev");
59            $(this).next().css("display","block");
60          }
61        });
62
63        $menuBtn02.on("click",function(){
64          if($(this).parent("li").hasClass('prev')){
65            $(this).parent().parent("ul").children("li").css("display","block");
66            $(this).parent().parent("ul").prev().css("display","block");
67            $(this).parent("li").css("display","block").removeClass("prev");
68            $(this).next().css("display","none");
69          }else{
70            $(this).parent().parent("ul").children("li").css("display","none");
71            $(this).parent().parent("ul").prev().css("display","none");
72            $(this).parent("li").css("display","block").addClass("prev");
73            $(this).next().css("display","block");
74          }
75        });
76
77        $searchBtn.on("click",function(){
78          if($(this).hasClass('open')) {
79            $searchBtn.removeClass('open');
80            $(this).next().fadeOut({
81              duration: 200,
82              easing: 'easeInOutQuart'
83            });
84          }else {
85            $searchBtn.removeClass('open');
86            $menuBtn.removeClass('open');
87            $searchBtn.next().hide();
88            $nav.hide();
89            $(this).addClass('open');
90            $(this).next().fadeIn({
91              duration: 200,
92              easing: 'easeInOutQuart'
93            });
94          }
95        });
96
97        $(window).on('load resize orientationchange', function () {
98          var navheight=$(window).height()-$("#header").outerHeight()+3;
99          $(".header_sp .nav").css("height",navheight);
100        });
101      }
102
103      globalObj = $(".inner .nav > li");
104      globalObj.off().on({
105        "mouseenter": function() {
106          $('body').append('<div class="modal_overlay"></div>');
107          $('.modal_overlay').fadeIn('slow');
108          $(this).find("span").next().stop().slideDown(200);
109          
110        },
111        "mouseleave": function() {
112          $(this).find("span").next().stop().hide();
113          $('.modal_overlay').remove();
114        }
115      });
116
117      placeObj = $(".inner .place_area .place");
118      placeObj.off().on({
119        "mouseenter": function() {
120          $('body').append('<div class="modal_overlay"></div>');
121          $('.modal_overlay').fadeIn('slow');
122          $(this).find("span").next().stop().slideDown(200);
123        },
124        "mouseleave": function() {
125          $(this).find("span").next().stop().hide();
126          $('.modal_overlay').remove();
127        }
128      });
129
130      $(".information_list dd,.aside_pick_up dd").dotdotdot({
131        wrap : 'letter'
132      });
133      $(window).on('resize', function () {
134        $(".information_list dd,.aside_pick_up dd").dotdotdot({
135          wrap : 'letter'
136        });
137      });
138    
139      /*var $btn = $("#article .tab_list li a");
140    
141      $btn.off().on("click",function(){
142        var $index = $(this).parent().index();
143    
144        $btn.parent().removeClass("current");
145        $btn.parent().eq($index).addClass("current");
146        $("#article .tab_content .tab_inner").removeClass("current");
147        $("#article .tab_content .tab_inner").eq($index).addClass("current");
148        $(".information_list dd").dotdotdot({
149          wrap : 'letter'
150        });
151        return false;
152      });*/
153
154      $('a[href^="#"]').not('a[class*="special"]').on("click", function () {
155        var h = $(this).attr("href");
156        var t = $(h == "#" || h == "" ? 'body' : h);
157        var p = t.offset().top;
158
159        $('html,body').animate({
160          scrollTop: p
161        }, 500);
162        return false;
163      });
164
165      // 外部リンク
166      $("a").not('a[class*="special"]').on("click", function () {
167        var targetHerf = $(this).attr('href');
168        if (/^http/.test(targetHerf) || /pdf$/.test(targetHerf)) {
169          window.open(targetHerf);
170          return false;
171        }
172      });
173
174      // 点線消し
175      $('a[href^="#"]').focus(function () {
176        this.blur();
177      });
178
179      //リサイズ時にブレークポイントを判別
180      $(window).on('load resize orientationchange', function () {
181      });
182
183			//wechart QR
184			$(".wechart_button").on({
185				'mouseenter': function(){
186					$(this).find(".qr_area").stop().slideDown(500);
187				},
188				'mouseleave': function(){
189					$(this).find(".qr_area").stop().slideUp(500);
190				}
191			});
192
193    }
194
195        return {
196            init: init
197        }
198
199    })();
200
201    $(share.init);
202})(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.