PageSourceSearch

https://pcmanabu.com/wp-content/themes/affinger/js/base.js?ver=7.1.2

js pcmanabu.com collected 2026-10-02 03:29:49 UTC 40,591 bytes, 1,300 lines download raw bytes

1/*--------------------------------
2フッターを最下部に
3-------------------------------*/
4
5new function(){
6    'use strict';
7    
8     var footerId = "footer";
9     var fixedClass = 'fixed-footer';
10     //メイン
11     function footerFixed(){
12          //ドキュメントの高さ
13          var dh = document.getElementsByTagName("body")[0].clientHeight;
14          //フッターのtopからの位置
15          document.getElementById(footerId).style.top = "0px";
16          var ft = document.getElementById(footerId).offsetTop;
17          //フッターの高さ
18          var fh = document.getElementById(footerId).offsetHeight;
19          //ウィンドウの高さ
20          var wh;
21          if (window.innerHeight){
22               wh = window.innerHeight;
23          }else if(document.documentElement && document.documentElement.clientHeight !== 0){
24               wh = document.documentElement.clientHeight;
25          }
26          if(ft+fh<wh){
27               document.getElementById(footerId).style.position = "relative";
28               document.getElementById(footerId).style.top = (wh-fh-ft-1)+"px";
29
30               if (document.body.classList) {
31                   document.body.classList.add(fixedClass);
32               } else {
33                   document.body.className += ' ' + fixedClass;
34               }
35          } else {
36              if (document.body.classList) {
37                  document.body.classList.remove(fixedClass);
38              } else {
39                  document.body.className = document.body.className.replace(
40                      new RegExp('(^|\\b)' + fixedClass + '(\\b|$)', 'gi'),
41                      ' '
42                  );
43              }
44          }
45     }
46    
47     //文字サイズ
48     function checkFontSize(func){
49    
50          //判定要素の追加    
51          var e = document.createElement("div");
52          var s = document.createTextNode("S");
53          e.appendChild(s);
54          e.style.visibility="hidden"
55          e.style.position="absolute"
56          e.style.top="0"
57          document.body.appendChild(e);
58          var defHeight = e.offsetHeight;
59         
60          //判定関数
61          function checkBoxSize(){
62               if(defHeight !== e.offsetHeight){
63                    func();
64                    defHeight= e.offsetHeight;
65               }
66          }
67          setInterval(checkBoxSize,1000)
68     }
69    
70     //イベントリスナー
71     function addEvent(elm,listener,fn){
72          try{
73               elm.addEventListener(listener,fn,false);
74          }catch(e){
75               elm.attachEvent("on"+listener,fn);
76          }
77     }
78
79     addEvent(window,"load",footerFixed);
80     addEvent(window,"load",function(){
81          checkFontSize(footerFixed);
82     });
83     addEvent(window,"resize",footerFixed);
84    
85}
86
87/*-------------
88ページスクロール
89-----------*/
90
91(function (window, document, $, undefined) {
92    'use strict';
93
94    $(function() {
95        var pageTop = $('#page-top');
96        pageTop.hide();
97        //スクロールが400に達したら表示
98        $(window).on('scroll', function () {
99            if($(this).scrollTop() > 400) {
100                pageTop.fadeIn();
101            } else {
102                pageTop.fadeOut();
103            }
104        });
105        //スクロールしてトップ
106            pageTop.on('click', function () {
107            $('body,html').animate({
108                scrollTop: 0
109            }, 800);
110            return false;
111            });
112      });
113}(window, window.document, jQuery));
114
115/*---------------------------
116アコーディオン
117------------------------------*/
118;(function (window, $, ST, undefined) {
119    'use strict';
120
121    /**
122     * transition event
123     */
124    var transitionEvent = (function detectTransitionEvent() {
125        var element     = document.createElement('div');
126        var transitions = {
127            'transition'      : 'transitionend',
128            'OTransition'     : 'oTransitionEnd',
129            'MozTransition'   : 'transitionend',
130            'WebkitTransition': 'webkitTransitionEnd'
131        };
132
133        for (var property in transitions) {
134            if (!Object.prototype.hasOwnProperty.call(transitions, property)) {
135                continue;
136            }
137
138            if (element.style[property] !== undefined) {
139                return transitions[property];
140            }
141        }
142
143        return 'transitionend';
144    }());
145
146    /**
147     * スマホかどうかを返す
148     */
149    function isMobile() {
150        return (ST.is_mobile === '1');
151    }
152
153    /**
154     * メニュー項目 (ホバーで開閉) のイベントリスナーファクトリ
155     */
156    function createHoverableMenuItemListener() {
157        return {
158            /**
159             * メニュークリック時
160             *
161             * @this {MenuItem}
162             */
163            click     : function (event) {
164                event.preventDefault();
165                event.stopPropagation();
166
167                if (this.isClickable()) {
168                    if (isMobile()) {
169                        this.getRoot().data('st-menu').collapseChildren(false);
170                    }
171
172                    window.location.href = this.getLink().attr('href');
173
174                    return;
175                }
176
177                this.toggle();
178            },
179            /**
180             * マウスエンター時
181             *
182             * @this {MenuItem}
183             */
184            mouseenter: function () {
185                if (isMobile()) {
186                    return;
187                }
188
189                this.expand();
190            },
191            /**
192             * マウスリーブ時
193             *
194             * @this {MenuItem}
195             */
196            mouseleave: function () {
197                if (isMobile()) {
198                    return;
199                }
200
201                this.collapse();
202            }
203        };
204    }
205
206    /**
207     * メニュー項目 (クリックでリンク) のイベントリスナーファクトリ
208     */
209    function createClickableMenuItemListener() {
210        return {
211            /**
212             * メニュークリック時
213             *
214             * @this {MenuItem}
215             */
216            click     : function (event) {
217                event.preventDefault();
218                event.stopPropagation();
219
220                if (this.isClickable()) {
221                    window.location.href = this.getLink().attr('href');
222
223                    return;
224                }
225
226                this.toggle();
227            },
228            /**
229             * マウスエンター時
230             *
231             * @this {MenuItem}
232             */
233            mouseenter: function () {
234                // Do nothing.
235            },
236            /**
237             * マウスリーブ時
238             *
239             * @this {MenuItem}
240             */
241            mouseleave: function () {
242                // Do nothing.
243            }
244        };
245    }
246
247    var MenuItem = (function () {
248        /**
249         * メニュー項目オブジェクト
250         */
251        function MenuItem($element, options) {
252            if (!(this instanceof MenuItem)) {
253                return new MenuItem($element);
254            }
255
256            var defaults = {
257                listener : {
258                    click     : function () {
259                    },
260                    mouseenter: function () {
261                    },
262                    mouseleave: function () {
263                    }
264                },
265                expanded : false,
266                hoverable: false,
267                link     : null,
268                children : null,
269                icon     : false
270            };
271
272            this.$element = $element;
273            this.options  = $.extend({}, defaults, options);
274
275            if (!this.options.link) {
276                this.options.link = function () {
277                    return this.$element.find('> a');
278                };
279            }
280
281            if (!this.options.children) {
282                this.options.children = function () {
283                    return this.$element.find('> ul');
284                };
285            }
286
287            this.expanded = this.options.expanded;
288            this.$icon    = null;
289        }
290
291        /**
292         * メニュー項目要素を取得
293         */
294        MenuItem.prototype.getElement = function getElement() {
295            return this.$element;
296        };
297
298        /**
299         * 親メニューがあるかどうかを返す
300         */
301        MenuItem.prototype.hasParent = function hasParent() {
302            var hasParent = false;
303
304            this.$element.parents().each(function () {    // eslint-disable-line consistent-return
305                if (typeof $(this).data('st-menu-item') !== 'undefined') {
306                    return false;
307                }
308            });
309
310            return hasParent;
311        };
312
313        /**
314         * ルートメニューを取得
315         */
316        MenuItem.prototype.getRoot = function getRoot() {
317            var $root = this.$element;
318
319            this.$element.parents().each(function () {
320                var $this = $(this);
321
322                if (typeof $this.data('st-menu-item') !== 'undefined') {
323                    $root = $this;
324                }
325            });
326
327            return $root;
328        };
329
330        /**
331         * アイコン要素を取得
332         */
333        MenuItem.prototype.getIcon = function getIcon() {
334            this.$icon = this.$icon || $('<i></i>').appendTo(this.getLink());
335
336            return this.$icon;
337        };
338
339        /**
340         * リンク要素を取得
341         */
342        MenuItem.prototype.getLink = function getLink() {
343            if (typeof this.options.link === 'function') {
344                return this.options.link.bind(this)();
345            } else {
346                return $(this.options.link).eq(0);
347            }
348        };
349
350        /**
351         * 子メニューがあるかどうかを返す
352         */
353        MenuItem.prototype.hasChildren = function hasChildren() {
354            if (typeof this.options.children === 'function') {
355                return this.options.children.bind(this)().length;
356            } else {
357                return $(this.options.children).length;
358            }
359        };
360
361        /**
362         * 展開済みかどうかを返す
363         */
364        MenuItem.prototype.isExpanded = function isExpanded() {
365            return this.expanded;
366        };
367
368        /**
369         * クリック可能かどうかを返す
370         *
371         * 子メニューがある場合は、展開済みの場合のみクリック可
372         */
373        MenuItem.prototype.isClickable = function isClckable() {
374            if (!this.getLink().length) {
375                return false;
376            }
377
378            return (!this.hasChildren() || (this.hasChildren() && this.isExpanded()));
379        };
380
381        /**
382         * 初期化
383         */
384        MenuItem.prototype.initialize = function initialzie() {
385            if (this.options.icon) {
386                this.$icon = $('<i></i>');
387
388                this.getLink().append(this.$icon);
389            }
390
391            this.refresh(false);
392            this.addEventListener();
393        };
394
395        /**
396         * 表示を更新
397         */
398        MenuItem.prototype.refresh = function refresh(animation) {
399            animation = (typeof animation !== 'undefined') ? animation : true;
400
401            if (this.expanded || !this.hasChildren()) {
402                this.expand(animation);
403            } else {
404                this.collapse(animation);
405            }
406        };
407
408        /**
409         * メニューを展開
410         */
411        MenuItem.prototype.expand = function expand(animation) {
412            var self   = this;
413            var $child = this.$element.find('> ul');
414
415            this.expanded = true;
416
417            animation = (typeof animation !== 'undefined') ? animation : true;
418
419            if (animation && $child.length) {
420                $child.animate({
421                        marginTop    : 'show',
422                        marginBottom : 'show',
423                        paddingTop   : 'show',
424                        paddingBottom: 'show',
425                        height       : 'show'
426                    },
427                    'fast',
428                    function () {
429                        if (self.options.icon) {
430                            self.getIcon().attr({'class': 'menu-item-icon st-fa st-svg-angle-right'});
431                        }
432
433                        self.$element.removeClass('menu-item-collapsed').addClass('menu-item-expanded');
434                    }
435                );
436            } else {
437                $child.show();
438
439                if (self.options.icon) {
440                    this.getIcon().attr({'class': 'menu-item-icon st-fa st-svg-angle-right'});
441                }
442
443                this.$element.removeClass('menu-item-collapsed').addClass('menu-item-expanded');
444            }
445        };
446
447        /**
448         * メニューを折り畳む
449         */
450        MenuItem.prototype.collapse = function collapse(animation) {
451            var self   = this;
452            var $child = this.$element.find('> ul');
453
454            this.expanded = false;
455
456            animation = (typeof animation !== 'undefined') ? animation : true;
457
458            if (animation && $child.length) {
459                $child.slideUp('fast', function () {
460                    if (self.options.icon) {
461                        self.getIcon().attr({'class': 'menu-item-icon st-fa st-svg-angle-down'});
462                    }
463
464                    self.$element.removeClass('menu-item-expanded').addClass('menu-item-collapsed');
465                });
466            } else {
467                $child.hide();
468
469                if ($child.length && self.options.icon) {
470                    this.getIcon().attr({'class': 'menu-item-icon st-fa st-svg-angle-down'});
471                }
472
473                this.$element.removeClass('menu-item-expanded').addClass('menu-item-collapsed');
474            }
475        };
476
477        /**
478         * メニューをトグル
479         */
480        MenuItem.prototype.toggle = function toggle() {
481            if (!this.hasChildren()) {
482                return;
483            }
484
485            this.expanded ? this.collapse() : this.expand();
486        };
487
488        /**
489         * イベントリスナーを登録
490         */
491        MenuItem.prototype.addEventListener = function addEventListener() {
492            this.getLink().on('click', $.proxy(this.options.listener.click, this));
493
494            if (this.options.hoverable) {
495                this.$element.on({
496                    mouseenter: $.proxy(this.options.listener.mouseenter, this),
497                    mouseleave: $.proxy(this.options.listener.mouseleave, this)
498                });
499            }
500        };
501
502        return MenuItem;
503    }());
504
505    var Menu = (function () {
506        /**
507         * メニューオブジェクト
508         */
509        function Menu($element, options) {
510            if (!(this instanceof Menu)) {
511                return new Menu();
512            }
513
514            var defaults = {
515                expanded : false,
516                hoverable: false,
517                link     : null,
518                children : null,
519                icon     : false
520            };
521
522            this.$element = $element;
523            this.options  = $.extend({}, defaults, options);
524        }
525
526        /**
527         * 初期化
528         */
529        Menu.prototype.initialize = function initialize() {
530            var self = this;
531
532            this.getMenuItems().each(function () {
533                var $this    = $(this);
534                var listener = self.options.hoverable ? createHoverableMenuItemListener() : createClickableMenuItemListener();
535
536                var options = {
537                    listener : listener,
538                    expanded : self.options.expanded,
539                    hoverable: self.options.hoverable,
540                    link     : self.options.link,
541                    children : self.options.children,
542                    icon     : self.options.icon
543                };
544
545                var menuItem = new MenuItem($this, options);
546
547                $this.data('st-menu', self);
548                $this.data('st-menu-item', menuItem);
549
550                menuItem.initialize();
551            });
552        };
553
554        /**
555         * メニュー項目要素を取得
556         */
557        Menu.prototype.getMenuItems = function getMenuItems() {
558            return this.$element.find('li');
559        };
560
561        /**
562         * 全てのメニュー項目を折り畳む
563         */
564        Menu.prototype.collapseChildren = function collapseChildren(animation) {
565            this.getMenuItems().each(function () {
566                $(this).data('st-menu-item').collapse(animation);
567            })
568        };
569
570        /**
571         * 全てのメニュー項目を開く
572         */
573        Menu.prototype.expandChildren = function collapseChildren(animation) {
574            this.getMenuItems().each(function () {
575                $(this).data('st-menu-item').expand(animation);
576            })
577        };
578
579        return Menu;
580    }());
581
582    var Navigation = (function () {
583        /**
584         * ナビゲーション
585         */
586        function Navigation($navigation, $toggle, $container, options) {
587            var defaults = {
588                $navigationContent      : $navigation,
589                activeClass             : 's-navi-active',
590                activatedClass          : 's-navi-activated',
591                waitTransitionendOnOpen : false,
592                waitTransitionendOnClose: false
593            };
594
595            this.$navigation = $navigation;
596            this.$toggle     = $toggle;
597            this.$container  = $container;
598            this.$overlay    = null;
599            this.options     = $.extend({}, defaults, options);
600            this.opened      = false;
601            this.scrollTop   = 0;
602        }
603
604        /**
605         * 開いているかどうかを返す
606         */
607        Navigation.prototype.isOpened = function isOpened() {
608            return this.opened;
609        };
610
611        /**
612         * 開く
613         */
614        Navigation.prototype.open = function open() {
615            var self = this;
616            var event;
617            var activationCallback;
618
619            if (self.opened) {
620                return;
621            }
622
623            self.scrollTop = $(window).scrollTop();
624
625            event = $.Event('open.stnavigation');
626
627            self.$navigation.trigger(event);
628
629            activationCallback = function () {
630                var height = (window.innerHeight === document.body.offsetHeight) ? window.innerHeight : document.body.offsetHeight;
631
632                height -= self.$navigation.outerHeight() - self.$navigation.height();
633
634                setTimeout(function () {
635                    self.options.$navigationContent.css({height: height + 'px'});
636                    $('html').addClass(self.options.activatedClass);
637
638                    self.opened = true;
639                }, 250);
640            };
641
642            if (window.innerHeight) {
643                if (self.options.waitTransitionendOnOpen) {
644                    self.$navigation.one(transitionEvent, activationCallback);
645                } else {
646                    activationCallback();
647                }
648            }
649
650            self.$toggle.addClass('active');
651            $('html').addClass(self.options.activeClass);
652
653            self.$container.css({top: '-' + self.scrollTop + 'px'});
654
655            self.options.$navigationContent.scrollTop(0);
656        };
657
658        /**
659         * 閉じる
660         */
661        Navigation.prototype.close = function close() {
662            var self = this;
663            var deactivationCallback;
664
665            if (!self.opened) {
666                return;
667            }
668
669            deactivationCallback = function () {
670                var $html = $('html');
671
672                $html.removeClass(self.options.activatedClass);
673                $html.removeClass(self.options.activeClass);
674                self.$toggle.removeClass('active');
675
676                self.options.$navigationContent.css({height: ''});
677                self.$container.css({top: ''});
678
679                $(window).scrollTop(self.scrollTop);
680
681                self.opened = false;
682            };
683
684            if (self.options.waitTransitionendOnClose) {
685                self.$navigation.one(transitionEvent, deactivationCallback);
686            } else {
687                deactivationCallback();
688            }
689
690            $('html').removeClass(self.options.activatedClass);
691        };
692
693        /**
694         * 更新
695         */
696        Navigation.prototype.refresh = function refresh() {
697            var self = this;
698            var height;
699
700            if (!self.opened) {
701                return;
702            }
703
704            if (window.matchMedia && window.matchMedia('screen and (min-width: 960px)').matches) {
705                self.close();
706
707                return;
708            }
709
710            height = (window.innerHeight === document.body.offsetHeight) ? window.innerHeight : document.body.offsetHeight;
711
712            height -= self.$navigation.outerHeight() - self.$navigation.height();
713
714            self.options.$navigationContent.css({height: height + 'px'});
715        };
716
717        /**
718         * イベントリスナーを登録
719         */
720        Navigation.prototype.addEventListeners = function addEventListeners() {
721            var self = this;
722            var resizeTimer;
723            var scrollTimer;
724
725            this.$toggle.on('click', function (event) {
726                event.preventDefault();
727                event.stopPropagation();
728
729                if (self.opened) {
730                    self.close();
731                } else {
732                    self.open();
733                }
734            });
735
736            if (self.options.overlay) {
737                this.$overlay.on('click', function (event) {
738                    event.preventDefault();
739                    event.stopPropagation();
740
741                    if (!self.opened) {
742                        return;
743                    }
744
745                    self.close();
746                });
747            }
748
749            $(window).on('orientationchange resize', function (event) {
750                if (resizeTimer) {
751                    clearTimeout(resizeTimer);
752                }
753
754                resizeTimer = setTimeout(function () {
755                    self.refresh();
756                }, 100);
757            });
758
759            self.options.$navigationContent.on('touchstart', function (event) {
760                if (scrollTimer) {
761                    clearTimeout(scrollTimer);
762                }
763
764                scrollTimer = setTimeout(function () {
765                    self.refresh();
766                }, 100);
767            });
768        };
769
770        /**
771         * 初期化
772         */
773        Navigation.prototype.initialize = function initialize() {
774            var self = this;
775            var event;
776
777            if (self.options.overlay && self.$overlay === null) {
778                var $overlay = $('#' + self.options.overlayId);
779
780                if ($overlay.length) {
781                    self.$overlay = $overlay;
782                } else {
783                    self.$overlay = $('<div></div>', {id: self.options.overlayId});
784
785                    self.$container.append(self.$overlay);
786                }
787            }
788
789            event = $.Event('initialize.stnavigation');
790
791            self.$navigation.trigger(event, {'navigation': self});
792
793            this.addEventListeners();
794        };
795
796        return Navigation;
797    }());
798
799    var SideMenu = (function () {
800        /**
801         * サイドメニュー
802         */
803        function SideMenu($menu, $container, options) {
804            var defaults = {
805                expanded : false,
806                hoverable: true,
807                link     : null,
808                children : null,
809                icon     : false
810            };
811
812            this.$menu   = $menu;
813            this.options = $.extend({}, defaults, options);
814        }
815
816        /**
817         * 初期化
818         */
819        SideMenu.prototype.initialize = function initialize() {
820            var self = this;
821
822            this.$menu.each(function () {
823                var $this = $(this);
824
825                var options = {
826                    expanded : self.options.expanded,
827                    hoverable: self.options.hoverable,
828                    link     : self.options.link,
829                    children : self.options.children,
830                    icon     : self.options.icon
831                };
832
833                var menu = new Menu($this, options);
834
835                $this.data('st-menu', menu);
836
837                menu.initialize();
838            });
839        };
840
841        return SideMenu;
842    }());
843
844    /**
845     * ナビゲーションを初期化
846     */
847    function initializeNavigation() {
848        var $navigation        = $('.acordion_tree'); // ナビゲーション要素
849        var $navigationContent = $('.acordion_tree .acordion_tree_content'); // ナビゲーションコンテンツ要素
850        var $trigger           = $('.op-menu'); // メニューボタン要素
851        var $container         = $('#st-ami'); // コンテナー要素
852        var $menu              = $('.acordion_tree ul.menu'); // メニュー要素
853
854        var navigationOptions = {
855            $navigationContent      : $navigationContent,
856            waitTransitionendOnClose: false,
857            overlay                 : true,
858            overlayId               : 's-navi-overlay'
859        };
860
861        var menuOptions = {
862            expanded          : (ST.expand_accordion_menu === '1'),
863            $navigationContent: $navigation,
864            hoverable         : false,
865            link              : null,
866            children          : null,
867            icon              : true
868        };
869
870        $navigation.on('initialize.stnavigation', function (event, data) {
871            var navigation = data.navigation;
872
873            $menu.each(function () {
874                var $this = $(this);
875
876                var menu = new Menu($this, menuOptions);
877
878                $this.data('st-menu', menu);
879
880                menu.initialize();
881            });
882        });
883
884        $navigation.on('open.stnavigation', function (event, data) {
885            if (menuOptions.expanded) {
886                $menu.each(function () {
887                    var menu = $(this).data('st-menu');
888
889                    menu.expandChildren(false);
890                });
891            } else {
892                $menu.each(function () {
893                    var menu = $(this).data('st-menu');
894
895                    menu.collapseChildren(false);
896                });
897            }
898        });
899
900        var navigation = new Navigation($navigation, $trigger, $container, navigationOptions);
901
902        navigation.initialize();
903    }
904
905    /**
906     * サイドメニューを初期化
907     */
908    function initializeSideMenu() {
909        var $menu = $('#side aside .st-pagelists ul'); // メニュー要素
910
911        var options = {
912            hoverable: isMobile(),
913        };
914
915        var sideMenu = new SideMenu($menu, options);
916
917        sideMenu.initialize();
918    }
919
920    /**
921     * 検索ナビゲーションを初期化
922     */
923    function initializeSearchNavigation() {
924        var $navigation        = $('.acordion_search'); // ナビゲーション要素
925        var $navigationContent = $('.acordion_search .acordion_search_content'); // ナビゲーションコンテンツ要素
926        var $trigger           = $('.op-search'); // メニューボタン要素
927        var $container         = $('#st-ami'); // コンテナー要素
928        var isOverlay          = $('html').hasClass('s-navi-search-overlay');
929        var overlayContainer   = !isOverlay;
930
931        var options = {
932            $navigationContent      : $navigationContent,
933            activeClass             : 's-navi-search-active',
934            activatedClass          : 's-navi-search-activated',
935            waitTransitionendOnClose: isOverlay,
936            overlay                 : overlayContainer,
937            overlayId               : 's-navi-overlay'
938        };
939
940        var navigation = new Navigation($navigation, $trigger, $container, options);
941
942        navigation.initialize();
943    }
944
945    /**
946     * DOM Ready 時
947     */
948    function onReady() {
949        initializeNavigation();
950
951        if (ST.sidemenu_accordion === '1') {
952            initializeSideMenu();
953        }
954
955        initializeSearchNavigation();
956    }
957
958    $(onReady);
959}(window, jQuery, ST));
960
961/*---------------------------
962その他
963------------------------------*/
964(function (window, document, $, undefined) {
965    'use strict';
966
967    $(function () {
968        /* 固定ページのメニュー */
969        $("ul.menu li").filter(function () {
970            return !$(this).closest('.acordion').length;
971        }).on({
972            mouseenter: function () {
973                $(">ul:not(:animated)", this).slideDown("fast");
974            },
975            mouseleave: function () {
976                $(">ul", this).slideUp("fast");
977            }
978        });
979
980        /* マイボタンから空のaタグを削除 */
981        $(".st-mybtn a:empty").remove();
982    });
983}(window, window.document, jQuery));
984
985/*---------------------------
986 スライドショー
987 ------------------------------*/
988;(function (window, document, $, undefined) {
989    'use strict';
990
991    if (typeof $.fn.slick === 'undefined') {
992        return;
993    }
994
995    function update(slick) {
996        var $slider = $(slick.$slider);
997
998        $slider.removeClass(function (index, className) {
999            return (className.match(/\bslick-slides-to-show-\S+/g) || []).join(' ');
1000        })
1001            .addClass('slick-slides-to-show-' + slick.options.slidesToShow);
1002
1003        if (Math.ceil(slick.slideCount / slick.options.slidesToScroll) > 10 ||
1004            slick.slideCount <= slick.options.slidesToShow) {
1005            $slider.removeClass('slick-dotted');
1006        }
1007    }
1008
1009    $(function () {
1010        $('[data-slick]')
1011            .on('init', function (event, slick) {
1012                update(slick);
1013            })
1014            .on('breakpoint', function (event, slick, breakpoint) {
1015                update(slick);
1016            })
1017            .slick();
1018    });
1019}(window, window.document, jQuery));
1020
1021/*---------------------------
1022 アイコン追加
1023 ------------------------------*/
1024(function (window, document, $, undefined) {
1025    'use strict';
1026
1027    $(function(){
1028        'use strict';
1029
1030        $('p.hatenamark').each(function(){
1031            $(this).prepend('<i class="st-fa st-svg-question-circle"></i>');
1032        });
1033        $('p.checkmark').each(function(){
1034            $(this).prepend('<i class="st-fa st-svg-check-circle"></i>');
1035        });
1036        $('.check-ul li').each(function(){
1037            $(this).prepend('<i class="st-fa st-svg-check-circle"></i>');
1038        });
1039        $('p.attentionmark').each(function(){
1040            $(this).prepend('<i class="st-fa st-svg-exclamation-triangle"></i>');
1041        });
1042        $('p.memomark').each(function(){
1043            $(this).prepend('<i class="st-fa st-svg-pencil-square-o"></i>');
1044        });
1045        $('p.usermark').each(function(){
1046            $(this).prepend('<i class="st-fa st-svg-user" aria-hidden="true"></i>');
1047        });
1048
1049
1050        $('h2.hatenamark').each(function(){
1051            $(this).prepend('<i class="st-fa st-svg-question-circle"></i>');
1052        });
1053        $('h2.checkmark').each(function(){
1054            $(this).prepend('<i class="st-fa st-svg-check-circle"></i>');
1055        });
1056        $('h2.attentionmark').each(function(){
1057            $(this).prepend('<i class="st-fa st-svg-exclamation-triangle"></i>');
1058        });
1059        $('h2.memomark').each(function(){
1060            $(this).prepend('<i class="st-fa st-svg-pencil-square-o"></i>');
1061        });
1062        $('h2.usermark').each(function(){
1063            $(this).prepend('<i class="st-fa st-svg-user" aria-hidden="true"></i>');
1064        });
1065
1066
1067        $('h3.hatenamark').each(function(){
1068            $(this).prepend('<i class="st-fa st-svg-question-circle"></i>');
1069        });
1070        $('h3.checkmark').each(function(){
1071            $(this).prepend('<i class="st-fa st-svg-check-circle"></i>');
1072        });
1073        $('h3.attentionmark').each(function(){
1074            $(this).prepend('<i class="st-fa st-svg-exclamation-triangle"></i>');
1075        });
1076        $('h3.memomark').each(function(){
1077            $(this).prepend('<i class="st-fa st-svg-pencil-square-o"></i>');
1078        });
1079        $('h3.usermark').each(function(){
1080            $(this).prepend('<i class="st-fa st-svg-user" aria-hidden="true"></i>');
1081        });
1082
1083
1084        $('h4.hatenamark').each(function(){
1085            $(this).prepend('<i class="st-fa st-svg-question-circle"></i>');
1086        });
1087        $('h4.checkmark').each(function(){
1088            $(this).prepend('<i class="st-fa st-svg-check-circle"></i>');
1089        });
1090        $('h4.attentionmark').each(function(){
1091            $(this).prepend('<i class="st-fa st-svg-exclamation-triangle"></i>');
1092        });
1093        $('h4.memomark').each(function(){
1094            $(this).prepend('<i class="st-fa st-svg-pencil-square-o"></i>');
1095        });
1096        $('h4.usermark').each(function(){
1097            $(this).prepend('<i class="st-fa st-svg-user" aria-hidden="true"></i>');
1098        });
1099
1100
1101        $('h5.hatenamark').each(function(){
1102            $(this).prepend('<i class="st-fa st-svg-question-circle"></i>');
1103        });
1104        $('h5.checkmark').each(function(){
1105            $(this).prepend('<i class="st-fa st-svg-check-circle"></i>');
1106        });
1107        $('h5.attentionmark').each(function(){
1108            $(this).prepend('<i class="st-fa st-svg-exclamation-triangle"></i>');
1109        });
1110        $('h5.memomark').each(function(){
1111            $(this).prepend('<i class="st-fa st-svg-pencil-square-o"></i>');
1112        });
1113        $('h5.usermark').each(function(){
1114            $(this).prepend('<i class="st-fa st-svg-user" aria-hidden="true"></i>');
1115        });
1116
1117    });
1118}(window, window.document, jQuery));
1119
1120/*---------------------------
1121 スマホのフッターメニュー
1122 ------------------------------*/
1123(function (window, document, $, undefined) {
1124    'use strict';
1125
1126    $(function() {
1127        'use strict';
1128
1129        var topBtn = $('#st-footermenubox');
1130        topBtn.css('bottom', '-100px');
1131        var showFlag = false;
1132        $(window).on('scroll', function () {
1133            if ($(this).scrollTop() > 100) {
1134                if (!showFlag) {
1135                    showFlag = true;
1136                    topBtn.stop().animate({'bottom' : '0px'}, 200);
1137                }
1138            } else {
1139                if (showFlag) {
1140                    showFlag = false;
1141                    topBtn.stop().animate({'bottom' : '-100px'}, 200);
1142                }
1143            }
1144        });
1145
1146    });
1147}(window, window.document, jQuery));
1148
1149/*---------------------------
1150 [st-back-btn]
1151 ------------------------------*/
1152(function (window, document, $, undefined) {
1153    'use strict';
1154
1155    var ST_BACK_BTN_KEY = 'stBackBtnHistory';
1156
1157    function history_get() {
1158        var history = window.sessionStorage.getItem(ST_BACK_BTN_KEY);
1159
1160        if (history) {
1161            return JSON.parse(history);
1162        }
1163
1164        return [];
1165    }
1166
1167    function history_push(url) {
1168        var history = history_get();
1169
1170        if (history.length >= 1 && history[history.length - 1] === url) {
1171            return;
1172        }
1173
1174        history.push(url);
1175        history.slice(0, 2);
1176
1177        window.sessionStorage.setItem(ST_BACK_BTN_KEY, JSON.stringify(history));
1178    }
1179
1180    function history_back() {
1181        var history = history_get();
1182        var url;
1183
1184        if (history.length <= 1) {
1185            return;
1186        }
1187
1188        url = history[history.length - 2];
1189
1190        window.history.pushState(null, null, url);
1191
1192        window.location.href = url;
1193    }
1194
1195    function on_ready() {
1196        var history = window.sessionStorage.getItem(ST_BACK_BTN_KEY) || [];
1197
1198        history_push(window.location.href);
1199
1200        if (history.length <= 1) {
1201            return;
1202        }
1203
1204        $('[data-st-back-btn]').each(function (index, element) {
1205            var $element = $(element);
1206            var html     = $element.html();
1207            var $button  = $(html);
1208
1209            $element.replaceWith($button);
1210        });
1211    }
1212
1213    $(on_ready);
1214
1215    window.st_back_btn_back = history_back;
1216}(window, window.document, jQuery));
1217
1218/*---------------------------
1219 .entry-contentにコンテンツがない場合
1220 ------------------------------*/
1221(function (window, document, $, undefined) {
1222    'use strict';
1223
1224    $(function () {
1225        var $content = $('.entry-content');
1226
1227        if ($content.text().trim() === '') {
1228            $('body').addClass('is-content-empty');
1229        }
1230    });
1231}(window, window.document, jQuery));
1232
1233/*---------------------------
1234サイドメニューの枠線調整
1235 ------------------------------*/
1236(function (window, document, $, undefined) {
1237    'use strict';
1238
1239    $(function () {
1240        $('.st-pagelists a').last().css({
1241            'border-bottom': 'none'
1242        });
1243        $('.st-pagelists li li').last().css({
1244            'border-bottom': 'none'
1245        });
1246    });
1247}(window, window.document, jQuery));
1248
1249/*---------------------------
1250カラムブロック横スクロール用のdivクラス
1251 ------------------------------*/
1252(function (window, document, $, undefined) {
1253    'use strict';
1254
1255    $(function () {
1256        $('.wp-block-columns.scroll-x-80').each(function(){
1257            $(this).wrap('<div class="scroll-x-80-wrapper"></div>');
1258        });
1259    });
1260}(window, window.document, jQuery));
1261
1262/*---------------------------
1263FAQブロックのおりたたみ
1264 ------------------------------*/
1265 document.addEventListener('DOMContentLoaded', function() {
1266    // 'st-toggle-visibility' クラスを含む dl 要素内のすべての dt 要素を選択
1267    const faqContainers = document.querySelectorAll('.st-toggle-visibility');
1268
1269    faqContainers.forEach(container => {
1270        const faqQuestions = container.querySelectorAll('.wp-block-st-blocks-faq-question');
1271
1272        faqQuestions.forEach(function(question) {
1273            question.addEventListener('click', function() {
1274                const answer = this.nextElementSibling; // dt の直後の dd を取得
1275                if (answer.style.display === 'none' || answer.style.display === '') {
1276                    answer.style.display = 'flex';
1277                    this.classList.add('active'); // active クラスを追加
1278                } else {
1279                    answer.style.display = 'none';
1280                    this.classList.remove('active'); // active クラスを削除
1281                }
1282            });
1283        });
1284    });
1285});
1286
1287/*---------------------------
1288リストスタイル(タイムライン)の調整
1289 ------------------------------*/
1290document.addEventListener("DOMContentLoaded", function () {
1291  const elements = document.querySelectorAll(
1292    '.wp-block-list.has-st-border, .wp-block-list.has-background'
1293  );
1294
1295  elements.forEach(el => {
1296    const style = window.getComputedStyle(el);
1297    const paddingLeft = style.getPropertyValue('padding-left');
1298    el.style.setProperty('--timeline-left', paddingLeft);
1299  });
1300});

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.