PageSourceSearch

https://www.glasiaous.com/wp-content/themes/glasiaous-co-wp/overwrite.js?ver=1791120254

js glasiaous.com collected 2026-10-04 13:24:34 UTC 12,867 bytes, 398 lines download raw bytes

1/*
2 * ====================================================================
3 * growp
4 * @package  growp
5 * @author   GrowGroup.Inc <[email protected]>
6 * @license  MIT Licence
7 * ====================================================================
8 */
9
10(function ($) {
11  var growApp = function () {};
12
13  /************************
14   * please insert your code
15   *************************/
16  growApp.prototype.myCode = function () {};
17
18  /************************
19   * 2023/01 サイト改修
20   *************************/
21  // ポップアップ
22  // growApp.prototype.popupBanner = function () {
23  //   const $popup = $(".js-banner-popup");
24  //   let isCookieBanner = true;
25  //   let observer;
26  //   let maxAttempts = 50; // 最大試行回数
27
28  //   function observeCookieBanner(attempts = 0) {
29  //     if (attempts >= maxAttempts) return; // 最大試行回数を超えたら終了
30
31  //     let $cookieBanner = $("#onetrust-banner-sdk");
32  //     if ($cookieBanner.length) {
33  //       let $cookieBannerHeight = $cookieBanner.height();
34  //       $popup.css("bottom", $cookieBannerHeight);
35
36  //       observer = new MutationObserver((mutationRecords) => {
37  //         let cookieBannerStyle = mutationRecords[0].target.style;
38  //         if (cookieBannerStyle["display"] === "none") {
39  //           isCookieBanner = false;
40  //         }
41  //         if (!isCookieBanner) {
42  //           $popup.css("bottom", 0);
43  //         }
44  //       });
45
46  //       observer.observe($cookieBanner[0], {
47  //         attributes: true,
48  //       });
49  //     } else {
50  //       setTimeout(() => observeCookieBanner(attempts + 1), 100); // 100ミリ秒後に再試行
51  //     }
52  //   }
53
54  //   observeCookieBanner(); // 最初に関数を呼び出して監視を開始
55
56  //   // 画面幅を変更した場合
57  //   $(window).resize(function () {
58  //     if (isCookieBanner) {
59  //       let $cookieBannerHeight = $("#onetrust-banner-sdk").height();
60  //       $popup.css("bottom", $cookieBannerHeight);
61  //     }
62  //   });
63  // };
64
65  growApp.prototype.popupBanner = function () {
66    const $openPopup = $(".js-banner-popup-open");
67    const $close = $(".js-banner-popup-close");
68    const $closePopup = $close.parent(".c-banner-popup__open");
69    const isFirstMobile = isMobile();
70    let isAdjustMobileFlg = false;
71
72    $openPopup.click(() => {
73      $openPopup.addClass("is-fixed-close");
74      $closePopup.removeClass("is-fixed-close");
75    });
76    $close.click(() => {
77      $openPopup.removeClass("is-fixed-close");
78      $closePopup.addClass("is-fixed-close");
79    });
80
81    if (!isMobile()) {
82      // クッキーバナー
83      let $cookieBanner = $("#onetrust-banner-sdk");
84      let $cookieBannerHeight = $cookieBanner.height();
85      // ポップアップバナーの高さを調整
86      $openPopup.css("bottom", $cookieBannerHeight);
87      $closePopup.css("bottom", $cookieBannerHeight);
88      let cookieBannerStyle = "";
89      let isCookieBanner = true;
90      // Cookieのバナーのスタイル属性を監視
91      let observer = new MutationObserver((mutationRecords) => {
92        // Cookieのバナーのスタイル属性を取得
93        cookieBannerStyle = mutationRecords[0].target.style;
94        if (cookieBannerStyle["display"] === "none") {
95          isCookieBanner = false;
96        }
97        if (!isCookieBanner) {
98          $openPopup.css("bottom", 100);
99          $closePopup.css("bottom", 100);
100        }
101      });
102      // 取得が早すぎてエラー吐くため
103      let elem = document.getElementById("onetrust-banner-sdk");
104      if (elem) {
105        observer.observe(elem, {
106          attributes: true,
107        });
108      }
109    }
110
111    if (isMobile()) {
112      $close.click();
113      adjustMobile();
114    }
115
116    // 画面幅を変更した場合
117    let resizeTimeout;
118    $(window).on('resize', function () {
119      if (resizeTimeout) {
120        clearTimeout(resizeTimeout);
121      }
122
123      resizeTimeout = setTimeout(() => { // debounce
124        if (!isMobile() && isCookieBanner) {
125          $cookieBannerHeight = $("#onetrust-banner-sdk").height();
126          $openPopup.css("bottom", $cookieBannerHeight);
127          $closePopup.css("bottom", $cookieBannerHeight);
128        }
129        if (!isAdjustMobileFlg) {
130          if (!isFirstMobile && isMobile()) {
131            adjustMobile();
132            isAdjustMobileFlg = true;
133          }
134        }
135      }, 250); // 250ms後にhandleResizeを実行
136    });
137
138    // スマホ調整用関数
139    function adjustMobile() {
140      setTimeout(() => {
141        $closePopup.addClass('is-first-sp-open'); // 初期値:visibility: hidden; を解除
142      }, 1000);
143    }
144
145    // モバイル判定
146    function isMobile() {
147      return window.innerWidth <= 750;
148    }
149  };
150
151
152
153
154
155  // 診断チャート
156  growApp.prototype.chart = function () {
157    // endStepNum 最終ステップ番号(今回は3)
158    const $container = $(".l-container");
159
160    const $chart = $(".c-chart");
161    if ($chart.length === 0) {
162      return;
163    }
164    const endStepNum = $chart.data("end-step");
165    let isEndStep = false;
166    $(".js-chart-next").click(function () {
167      let $content = $(this).parents(".c-chart__content");
168      let currentStep = $content.data("step");
169      let stepArray = [];
170      let nextStepArray = [];
171      // 数値かどうか判別する(例:1, 2-1)
172      if (!isNaN(currentStep)) {
173        stepArray.push(currentStep);
174      } else {
175        stepArray = currentStep.split("-");
176      }
177      let nextStep = $("input[name=step" + currentStep + "]:checked").val();
178      // GTMの発火イベントをnexrStepの値を見て行う
179      if (nextStep === undefined) {
180        alert("選択肢が選択されていません");
181        return false;
182      }
183      if (!isNaN(nextStep)) {
184        nextStepArray.push(nextStep);
185      } else {
186        nextStepArray = nextStep.split("-");
187      }
188      if (nextStepArray[0] == endStepNum) {
189        isEndStep = true;
190      }
191      $nextStepContent = $('[data-step="' + nextStep + '"]');
192
193      // アニメーション
194      $content.addClass("is-end");
195      setTimeout(function () {
196        $content.removeClass("is-current");
197        $nextStepContent.addClass("is-current");
198        setTimeout(function () {
199          if (isEndStep) {
200            $container.addClass("is-chart-end");
201          }
202          $nextStepContent.removeClass("is-start");
203        }, 200);
204      }, 200);
205    });
206
207    $(".js-chart-prev").click(function () {
208      let $content = $(this).parents(".c-chart__content");
209      let currentStep = $content.data("step");
210      let prevStep = "";
211      let stepArray = [];
212      // 数値かどうか判別する(例:1, 2-1)
213      if (!isNaN(currentStep)) {
214        stepArray.push(currentStep);
215      } else {
216        stepArray = currentStep.split("-");
217      }
218      if (stepArray.length >= 2) {
219        for (let i = 0; i < stepArray.length - 1; i++) {
220          if (i == 0) {
221            prevStep += stepArray[i] - 1;
222          } else {
223            prevStep += "-" + stepArray[i];
224          }
225        }
226      }
227      $prevStepContent = $('[data-step="' + prevStep + '"]');
228
229      // アニメーション
230      $content.addClass("is-start");
231      setTimeout(function () {
232        $content.removeClass("is-current");
233        $container.removeClass("is-chart-end");
234        $prevStepContent.addClass("is-current");
235        setTimeout(function () {
236          $prevStepContent.removeClass("is-end");
237        }, 200);
238      }, 200);
239    });
240    $(".js-chart__label input[type='radio']").click(function () {
241      let $radios = $(this).parents(".c-chart__detail").find(".c-chart__item");
242      $radios.removeClass("is-checked");
243      $(this).parents(".c-chart__item").addClass("is-checked");
244    });
245    $(".js-chart__button").click(function (e) {
246      let data = $(this).data("link");
247      if (isEndStep) {
248        switch (data) {
249          case "2-1":
250            // console.log("2-1")
251            // dataLayer.push({'event': 'chart-grasious'});
252            break;
253          case "2-2":
254            // console.log("2-2")
255            // dataLayer.push({'event': 'chart-contact'});
256            break;
257          case "3-1-1":
258            // console.log("プレミアムパック");
259            dataLayer.push({ event: "chart-premium" });
260            break;
261          case "3-1-2":
262            // console.log("スタンダードパック");
263            dataLayer.push({ event: "chart-standard" });
264            break;
265          case "3-2-1":
266            // console.log("ERPパック");
267            dataLayer.push({ event: "chart-erp" });
268            break;
269          case "3-2-2":
270            // console.log("オペレーションパック");
271            dataLayer.push({ event: "chart-operation" });
272            break;
273          case "3-3-1":
274            // console.log("スタンダードパック+連携オプション");
275            dataLayer.push({ event: "chart-linkage-option" });
276            break;
277          case "3-3-2":
278            // e.preventDefault()
279            // console.log("担当者へお問い合わせください");
280            dataLayer.push({ event: "chart-contact" });
281            break;
282        }
283      }
284    });
285  };
286
287  growApp.prototype.searchFormModal = function () {
288    const triggerbtnName = ".js-header-searchform-open";
289    const contentName = ".js-header-searchform-content";
290    // const closebtnName = ".js-header-searchform-close";
291    const $triggerbtn = $(triggerbtnName);
292    const $content = $(contentName);
293    // const $closebtn = $(closebtnName);
294
295    $triggerbtn.click(function (e) {
296      //トリガーボタンを押したときの動作
297      if ($("body").hasClass("is-search-modal-open")) {
298        $("body").removeClass("is-search-modal-open");
299        $triggerbtn.removeClass("is-active");
300      } else {
301        $("body").addClass("is-search-modal-open");
302        $triggerbtn.addClass("is-active");
303      }
304    });
305    $(document).on("click", function (e) {
306      //bodyに.is-search-modal-openがついているときに、
307      //検索フォーム本体でもトリガーボタンでも無い要素が押されたら
308      if (
309        !$(e.target).closest(contentName).length &&
310        !$(e.target).closest(triggerbtnName).length
311      ) {
312        if ($("body").hasClass("is-search-modal-open")) {
313          //bodyの.is-search-modal-openと、トリガーボタンの.is-activeを外す
314          $("body").removeClass("is-search-modal-open");
315          $triggerbtn.removeClass("is-active");
316        }
317      }
318    });
319  };
320  $(function () {
321    var app = new growApp();
322    app.myCode();
323    app.popupBanner();
324    app.chart();
325    app.searchFormModal();
326  });
327})(jQuery);
328
329function click_front_news_more(e) {
330  var news_inner = e.parentNode.parentNode;
331  news_inner.classList.add("is-open");
332}
333
334(function ($) {
335  $(function () {
336    var $parent = $(".js-tabs-together"),
337      $nav = $(".js-tabs-together-nav"),
338      $cont = $(".js-tabs-together-content");
339
340    $(".js-tabs-together-nav li .c-button").on("click", function () {
341      let parentItem = $(this).closest(".js-tabs-together");
342      let tabNum = $(this).data("tab-together-nav");
343
344      //ナビゲーションのクラス付け替え
345      parentItem.find(".js-tabs-together-nav li .c-button").each(function () {
346        $(this).removeClass("is-active");
347        if (tabNum === $(this).data("tab-together-nav")) {
348          $(this).addClass("is-active");
349        }
350      });
351
352      // パネルクラス付け替え
353      parentItem.find(".js-tabs-together-content-item").each(function () {
354        $(this).removeClass("is-active");
355        if (tabNum === $(this).data("tab-together-panel")) {
356          $(this).addClass("is-active");
357        }
358      });
359    });
360
361    // $parent.find(".js-tabs-together-nav li span").click(function (e) {
362    //   // e.preventDefault();
363    //   var $self = $(this);
364    //   var click_nav_data = $self.data("tab-together-nav");
365
366    //ナビゲーションのクラス付け替え
367    // $nav.find("span").each(function (e) {
368    //   $(this).removeClass("is-active");
369    //   var nav_data = $(this).data("tab-together-nav");
370    //   if (nav_data == click_nav_data) {
371    //     $(this).addClass("is-active");
372    //   }
373    // });
374
375    //パネルクラス付け替え
376    // $cont.find(".js-tabs-together-content-item").each(function () {
377    //   $(this).removeClass("is-active");
378    //   var cont_data = $(this).data("tab-together-panel");
379    //   if (cont_data == click_nav_data) {
380    //     $(this).addClass("is-active");
381    //   }
382    // });
383    return false;
384  });
385})(jQuery);
386
387(function ($) {
388	$(document).ready(function () {
389			$('.l-header-minimal__parent').hover(
390					function () {
391							$('body').addClass('is-hover');
392					},
393					function () {
394							$('body').removeClass('is-hover');
395					}
396			);
397	});
398})(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.