PageSourceSearch

https://www.abcclinicad.com/common/js/common.js

js abcclinicad.com collected 2026-10-07 16:58:02 UTC 1,177 bytes, 42 lines download raw bytes

1const btn = document.querySelector('.header-btn');
2const nav = document.querySelector('.gnav');
3 
4btn.addEventListener('click', () => {
5  nav.classList.toggle('gnav_active'),
6  btn.classList.toggle('header-btn_close')
7});
8
9// モーダルウィンド
10$(function () {
11	$(".modaal_image").modaal({
12		type: 'image'
13	});
14});
15
16// スマートフォンかどうか判断して、スマートフォンの場合のみ処理
17if (IsSmartPhone())
18{
19    // ソースが全て書き出された後に処理
20    $(function()
21    {
22      // 全ての『data-sp-href』属性を繰り返し処理
23      $('body').find('[data-sp-href]').each(function()
24      {
25          // リンクを入れ替え
26          $(this).attr('href', $(this).attr('data-sp-href'));
27      });
28    });
29}
30// スマートフォンかどうか判断するメソッド
31function IsSmartPhone()
32{
33  // デバイスの種類
34  var media =
35  [
36    'iPhone',
37    'Windows Phone',
38    'Android'
39  ];
40  var pattern = new RegExp(media.join('|'), 'i'); //デバイスの種類を正規表現にする。
41  return pattern.test(navigator.userAgent); //ユーザーエージェントにデバイスが含まれるかを調べる。
42}

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.