PageSourceSearch

https://isijint.net/production/wp-content/themes/isijint/assets/js/custom.js?1790967005

js isijint.net collected 2026-10-02 18:50:23 UTC 2,679 bytes, 113 lines download raw bytes

1// IEからEdgeへリダイレクト
2let userAgent = window.navigator.userAgent.toLowerCase();
3if (userAgent.indexOf('msie') !== -1 || userAgent.indexOf('trident') !== -1) {
4  var s = '';
5  if (location.href.indexOf('isijint.net/jp/') !== -1) {
6    s = 'jp/';
7  }
8  location.href = 'microsoft-edge:https://isijint.net/' + s;
9}
10
11// ページ上部へのスクロール
12$(function () {
13  var topBtn = $('#page-top');
14  topBtn.hide();
15  //スクロールが100に達したらボタンとメニュー表示
16  $(window).scroll(function () {
17    if ($(this).scrollTop() > 160) {
18      topBtn.fadeIn();
19    } else {
20      topBtn.fadeOut();
21    }
22  });
23  //スクロールしてトップ
24  topBtn.click(function () {
25    $('body,html').animate(
26      {
27        scrollTop: 0,
28      },
29      500
30    );
31    return false;
32  });
33});
34
35// ページ内スクロール
36$(function () {
37  let wWidth = $('html, body').width() + 20;
38
39  function scroll(diff) {
40    $('[data-innerfrom]').click(function () {
41      var speed = 500;
42      var target = $(this).data('innerfrom');
43      console.log(target);
44      var position = $("[data-innerto='" + target + "']").offset().top - diff;
45      $('html, body').animate(
46        {
47          scrollTop: position,
48        },
49        speed,
50        'swing'
51      );
52      return false;
53    });
54  }
55
56  if (wWidth < 768) {
57    scroll('40');
58  } else if (767 < wWidth) {
59    scroll('40');
60  }
61});
62
63$(function () {
64  var nav = $('nav');
65  $('.btn-menu').click(function () {
66    $(this).toggleClass('active-menu');
67    $('.latest-metrics').toggleClass('close');
68    $('.box__search').fadeToggle('fast');
69    $('body').toggleClass('noScroll');
70    nav.fadeToggle('fast');
71  });
72});
73
74//ナビゲーション切り替え
75$(window).on('load resize', function () {
76  var wWidth = $('html, body').width() + 20;
77  if (479 < wWidth) {
78    $('.unit__nav').hover(
79      function () {
80        $(this).children('.child').slideDown(200);
81      },
82      function () {
83        $(this).children('.child').stop(true);
84        $(this).children('.child').slideUp(200);
85      }
86    );
87  }
88});
89
90// アコーディオン
91$(function () {
92  $('.title__ac').click(function () {
93    $(this).toggleClass('open');
94    $(this).next('.unit__ac').slideToggle('fast');
95  });
96});
97
98// サイドメニュー
99$(function () {
100  $('aside > .category').hide();
101  let current_slug = $('nav').data('current');
102  let slug = $('nav').data('slug');
103
104  if (slug == 'about') {
105    current_slug = 'about';
106  }
107
108  if (current_slug == 'guide-to-authors') {
109    $("[data-parent='guide-to-authors']").show();
110  } else {
111    $("[data-parent='" + current_slug + "'], [data-parent='guide-to-authors']").show();
112  }
113});

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.