PageSourceSearch

https://cybertrust.co.jp/js/common.js

js cybertrust.co.jp collected 2026-09-24 18:02:58 UTC 5,140 bytes, 179 lines download raw bytes

1$(function() {
2  
3
4  
5  //スマホメニュー
6  $(".header-sp-btn").click(function() {
7    $(this).next().slideToggle(300);
8    $(this).toggleClass("is-open");
9  });
10  
11  //メガメニュー
12  $(".header-nav__item").hover(function() {
13    $(this).find(".megamenu").fadeIn(300);
14  }, function() {
15    $(this).find(".megamenu").fadeOut(300);
16  });
17
18  
19  //クリッカブルマップのレスポンシブ
20  if($("img[usemap]")[0]) {
21    $("img[usemap]").rwdImageMaps();
22  }
23
24
25  //ローカルメニュー
26  if($(".local-menu")[0]) {
27    $(".local-menu__btn").click(function() {
28      $(this).next().slideToggle(300);
29    });
30  }
31
32  //.info-rowのflexbox調整
33  if($(".info-row")[0]) {
34    $(".info-row .info-row__col").each(function(index, element) {
35      var w = $(element).width();
36      $(".info-row").append('<div style="width:'+ w +'px;"></div>');
37    });
38  }
39
40
41 
42});
43
44$(window).on('load resize', function() {
45
46  //記事一覧の画像高さ
47  if($(".info-row")[0]) {
48    $(".info-row__img").height($(".info-row__img").width()*(147/279));
49  }
50
51});
52
53
54
55window.onload = function() {
56    var searchInput = document.getElementById('gsc-i-id1');
57    if (searchInput) {
58      searchInput.placeholder = 'サイト内を検索:';
59    }
60};
61
62
63
64
65$(function () {
66  //Light Box
67  var lightbox_class = '.bs-lightbox';  //画像へのリンク(a 要素)に指定するクラス
68  var modal_id = 'bs-lbox-dialog'; //モーダルの要素に指定する ID
69  var modal_id_hash = '#' + modal_id; //ID の前に # を付けた値
70  //「閉じる」ボタンにインラインで指定するスタイル
71  var button_style = 'style="position:absolute; right:-1em; top:-1em; background:#FFF; height:1em; width:1em; border-radius:1em;"';
72  //閉じるの「x」にインラインで指定するスタイル
73  var span_style = '';
74  
75  if($(lightbox_class).length > 0 ) {//bs-lightboxクラスを指定した要素が存在すれば以下を実行
76 
77    $('a' + lightbox_class).each(function() { //画像の先読み込み
78      $("<img>").attr("src", $(this).attr('href'));
79    });
80    
81    var size = 'modal-xl'; //モーダルのサイズを指定(modal-sm/modal-lg/modal-xl/'')
82 
83    $('body').append('<div class="modal fade" id="' + modal_id + '" tabindex="-1" role="dialog" aria-hidden="true"><div class="modal-dialog modal-dialog-centered ' + size + '" role="img"><div class="modal-content"><button type="button" class="close" data-bs-dismiss="modal" aria-label="Close" ' + button_style + '> <span aria-hidden="true" ' + span_style + '>&times;</span> </button><img src="/img/trans.png" alt=""> </div></div></div>');
84 
85    $(lightbox_class).each(function() {
86      $(this).attr('data-bs-target', modal_id_hash).attr('data-bs-toggle', 'modal');
87    });
88  }
89 
90  $(modal_id_hash).on('show.bs.modal', function (event) {
91    var image_link = $(event.relatedTarget);// モーダルを起動する要素(クリックされた a 要素)
92    var href = image_link.attr('href'); // href 属性から URL を取得
93    // 以下でモーダルダイアログの img 要素(拡大表示する画像)の src 属性を更新
94    var modal = $(this); // this はモーダルダイアログの要素
95    modal.find('.modal-content img').attr('src', href);
96  });
97  
98});
99
100
101
102
103//QAトグル
104
105$(function() {
106  if($(".box_acc")[0]) {
107    $(".box_acc dt").on("click", function() {
108      $(this).next().slideToggle("fast");
109      $(this).toggleClass("active");
110    });
111  }
112});
113
114
115
116
117
118//トップに戻るフローティングボタン
119$(window).scroll(function(){
120    if($(this).scrollTop() > 60){
121        $('#floating-pagetop').fadeIn();
122    }else{
123        $('#floating-pagetop').fadeOut();
124    }
125});
126
127$(function() {
128  $("#floating-pagetop").click(function(){
129    $('body,html').animate({
130      scrollTop:0
131    },500)
132  });
133});
134
135
136// ソーシャルボタンのURLクリップボード機能
137function clipurl(){
138   var text = document.title + '\n' + document.URL;
139   navigator.clipboard.writeText(text).then(e => {
140     document.getElementById("clipboard-info").innerText = "コピーしました";
141   });
142}
143
144//YouTube等埋め込みプレーヤーのサイズ調整
145$(window).on("load resize", function() {
146  if($(".embed-player")[0]) {
147    $(".embed-player iframe").css({
148      "width": $(".embed-player").width(),
149      "height": $(".embed-player").width() * .5625
150    });
151  }
152});
153
154
155//MatchHeight Pure JavaScript
156function matchHeight() {
157  var cols = document.querySelectorAll('[data-height]')
158  var encountered = []
159  for (i=0; i<cols.length; i++) {
160    var attr = cols[i].getAttribute('data-height')
161    if (encountered.indexOf(attr) == -1) {
162      encountered.push(attr)
163    }
164  }
165  for (set=0; set<encountered.length; set++) {
166    var col = document.querySelectorAll('[data-height="' + encountered[set] + '"]')
167    var group = []
168    for (i=0; i<col.length; i++) {
169      col[i].style.height = 'auto'
170      group.push(col[i].scrollHeight)
171    }
172    for (i=0; i<col.length; i++) {
173      col[i].style.height = Math.max.apply(Math, group) + 'px'
174    }
175  }
176}
177window.addEventListener('load', matchHeight)
178window.addEventListener('resize', matchHeight)
179

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.