PageSourceSearch

https://adultinfojpn.com/wp-content/themes/affinger/js/base.js?ver=7.0.6

js adultinfojpn.com collected 2026-10-03 00:06:35 UTC 38,800 bytes, 1,258 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).scroll(function () {
99            if($(this).scrollTop() > 400) {
100                pageTop.fadeIn();
101            } else {
102                pageTop.fadeOut();
103            }
104        });
105        //スクロールしてトップ
106            pageTop.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().click($.proxy(this.options.listener.click, this));
493
494            if (this.options.hoverable) {
495                this.$element.hover(
496                    $.proxy(this.options.listener.mouseenter, this),
497                    $.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});
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.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.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 />', {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        }).hover(function () {
972            $(">ul:not(:animated)", this).slideDown("fast");
973        }, function () {
974            $(">ul", this).slideUp("fast");
975        });
976
977        /* マイボタンから空のaタグを削除 */
978        $(".st-mybtn a:empty").remove();
979    });
980}(window, window.document, jQuery));
981
982/*---------------------------
983 スライドショー
984 ------------------------------*/
985;(function (window, document, $, undefined) {
986    'use strict';
987
988    if (typeof $.fn.slick === 'undefined') {
989        return;
990    }
991
992    function update(slick) {
993        var $slider = $(slick.$slider);
994
995        $slider.removeClass(function (index, className) {
996            return (className.match(/\bslick-slides-to-show-\S+/g) || []).join(' ');
997        })
998            .addClass('slick-slides-to-show-' + slick.options.slidesToShow);
999
1000        if (Math.ceil(slick.slideCount / slick.options.slidesToScroll) > 10 ||
1001            slick.slideCount <= slick.options.slidesToShow) {
1002            $slider.removeClass('slick-dotted');
1003        }
1004    }
1005
1006    $(function () {
1007        $('[data-slick]')
1008            .on('init', function (event, slick) {
1009                update(slick);
1010            })
1011            .on('breakpoint', function (event, slick, breakpoint) {
1012                update(slick);
1013            })
1014            .slick();
1015    });
1016}(window, window.document, jQuery));
1017
1018/*---------------------------
1019 アイコン追加
1020 ------------------------------*/
1021(function (window, document, $, undefined) {
1022    'use strict';
1023
1024    $(function(){
1025        'use strict';
1026
1027        $('p.hatenamark').each(function(){
1028            $(this).prepend('<i class="st-fa st-svg-question-circle"></i>');
1029        });
1030        $('p.checkmark').each(function(){
1031            $(this).prepend('<i class="st-fa st-svg-check-circle"></i>');
1032        });
1033        $('.check-ul li').each(function(){
1034            $(this).prepend('<i class="st-fa st-svg-check-circle"></i>');
1035        });
1036        $('p.attentionmark').each(function(){
1037            $(this).prepend('<i class="st-fa st-svg-exclamation-triangle"></i>');
1038        });
1039        $('p.memomark').each(function(){
1040            $(this).prepend('<i class="st-fa st-svg-pencil-square-o"></i>');
1041        });
1042        $('p.usermark').each(function(){
1043            $(this).prepend('<i class="st-fa st-svg-user" aria-hidden="true"></i>');
1044        });
1045
1046
1047        $('h2.hatenamark').each(function(){
1048            $(this).prepend('<i class="st-fa st-svg-question-circle"></i>');
1049        });
1050        $('h2.checkmark').each(function(){
1051            $(this).prepend('<i class="st-fa st-svg-check-circle"></i>');
1052        });
1053        $('h2.attentionmark').each(function(){
1054            $(this).prepend('<i class="st-fa st-svg-exclamation-triangle"></i>');
1055        });
1056        $('h2.memomark').each(function(){
1057            $(this).prepend('<i class="st-fa st-svg-pencil-square-o"></i>');
1058        });
1059        $('h2.usermark').each(function(){
1060            $(this).prepend('<i class="st-fa st-svg-user" aria-hidden="true"></i>');
1061        });
1062
1063
1064        $('h3.hatenamark').each(function(){
1065            $(this).prepend('<i class="st-fa st-svg-question-circle"></i>');
1066        });
1067        $('h3.checkmark').each(function(){
1068            $(this).prepend('<i class="st-fa st-svg-check-circle"></i>');
1069        });
1070        $('h3.attentionmark').each(function(){
1071            $(this).prepend('<i class="st-fa st-svg-exclamation-triangle"></i>');
1072        });
1073        $('h3.memomark').each(function(){
1074            $(this).prepend('<i class="st-fa st-svg-pencil-square-o"></i>');
1075        });
1076        $('h3.usermark').each(function(){
1077            $(this).prepend('<i class="st-fa st-svg-user" aria-hidden="true"></i>');
1078        });
1079
1080
1081        $('h4.hatenamark').each(function(){
1082            $(this).prepend('<i class="st-fa st-svg-question-circle"></i>');
1083        });
1084        $('h4.checkmark').each(function(){
1085            $(this).prepend('<i class="st-fa st-svg-check-circle"></i>');
1086        });
1087        $('h4.attentionmark').each(function(){
1088            $(this).prepend('<i class="st-fa st-svg-exclamation-triangle"></i>');
1089        });
1090        $('h4.memomark').each(function(){
1091            $(this).prepend('<i class="st-fa st-svg-pencil-square-o"></i>');
1092        });
1093        $('h4.usermark').each(function(){
1094            $(this).prepend('<i class="st-fa st-svg-user" aria-hidden="true"></i>');
1095        });
1096
1097
1098        $('h5.hatenamark').each(function(){
1099            $(this).prepend('<i class="st-fa st-svg-question-circle"></i>');
1100        });
1101        $('h5.checkmark').each(function(){
1102            $(this).prepend('<i class="st-fa st-svg-check-circle"></i>');
1103        });
1104        $('h5.attentionmark').each(function(){
1105            $(this).prepend('<i class="st-fa st-svg-exclamation-triangle"></i>');
1106        });
1107        $('h5.memomark').each(function(){
1108            $(this).prepend('<i class="st-fa st-svg-pencil-square-o"></i>');
1109        });
1110        $('h5.usermark').each(function(){
1111            $(this).prepend('<i class="st-fa st-svg-user" aria-hidden="true"></i>');
1112        });
1113
1114    });
1115}(window, window.document, jQuery));
1116
1117/*---------------------------
1118 スマホのフッターメニュー
1119 ------------------------------*/
1120(function (window, document, $, undefined) {
1121    'use strict';
1122
1123    $(function() {
1124        'use strict';
1125
1126        var topBtn = $('#st-footermenubox');
1127        topBtn.css('bottom', '-100px');
1128        var showFlag = false;
1129        $(window).scroll(function () {
1130            if ($(this).scrollTop() > 100) {
1131                if (!showFlag) {
1132                    showFlag = true;
1133                    topBtn.stop().animate({'bottom' : '0px'}, 200);
1134                }
1135            } else {
1136                if (showFlag) {
1137                    showFlag = false;
1138                    topBtn.stop().animate({'bottom' : '-100px'}, 200);
1139                }
1140            }
1141        });
1142
1143    });
1144}(window, window.document, jQuery));
1145
1146/*---------------------------
1147 [st-back-btn]
1148 ------------------------------*/
1149(function (window, document, $, undefined) {
1150    'use strict';
1151
1152    var ST_BACK_BTN_KEY = 'stBackBtnHistory';
1153
1154    function history_get() {
1155        var history = window.sessionStorage.getItem(ST_BACK_BTN_KEY);
1156
1157        if (history) {
1158            return JSON.parse(history);
1159        }
1160
1161        return [];
1162    }
1163
1164    function history_push(url) {
1165        var history = history_get();
1166
1167        if (history.length >= 1 && history[history.length - 1] === url) {
1168            return;
1169        }
1170
1171        history.push(url);
1172        history.slice(0, 2);
1173
1174        window.sessionStorage.setItem(ST_BACK_BTN_KEY, JSON.stringify(history));
1175    }
1176
1177    function history_back() {
1178        var history = history_get();
1179        var url;
1180
1181        if (history.length <= 1) {
1182            return;
1183        }
1184
1185        url = history[history.length - 2];
1186
1187        window.history.pushState(null, null, url);
1188
1189        window.location.href = url;
1190    }
1191
1192    function on_ready() {
1193        var history = window.sessionStorage.getItem(ST_BACK_BTN_KEY) || [];
1194
1195        history_push(window.location.href);
1196
1197        if (history.length <= 1) {
1198            return;
1199        }
1200
1201        $('[data-st-back-btn]').each(function (index, element) {
1202            var $element = $(element);
1203            var html     = $element.html();
1204            var $button  = $(html);
1205
1206            $element.replaceWith($button);
1207        });
1208    }
1209
1210    $(on_ready);
1211
1212    window.st_back_btn_back = history_back;
1213}(window, window.document, jQuery));
1214
1215/*---------------------------
1216 .entry-contentにコンテンツがない場合
1217 ------------------------------*/
1218(function (window, document, $, undefined) {
1219    'use strict';
1220
1221    $(function () {
1222        var $content = $('.entry-content');
1223
1224        if ($.trim($content.text()) === '') {
1225            $('body').addClass('is-content-empty');
1226        }
1227    });
1228}(window, window.document, jQuery));
1229
1230/*---------------------------
1231サイドメニューの枠線調整
1232 ------------------------------*/
1233(function (window, document, $, undefined) {
1234    'use strict';
1235
1236    $(function () {
1237        $('.st-pagelists a').last().css({
1238            'border-bottom': 'none'
1239        });
1240        $('.st-pagelists li li').last().css({
1241            'border-bottom': 'none'
1242        });
1243    });
1244}(window, window.document, jQuery));
1245
1246/*---------------------------
1247カラムブロック横スクロール用のdivクラス
1248 ------------------------------*/
1249(function (window, document, $, undefined) {
1250    'use strict';
1251
1252    $(function () {
1253        $('.wp-block-columns.scroll-x-80').each(function(){
1254            $(this).wrap('<div class="scroll-x-80-wrapper"></div>');
1255        });
1256    });
1257}(window, window.document, jQuery));
1258

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.