PageSourceSearch

https://www.adultgeek.net/wp-content/themes/video/js/custom.js?ver=6.8.10

js adultgeek.net collected 2026-10-06 15:12:58 UTC 7,323 bytes, 203 lines download raw bytes

1console.log('custom.js loaded');
2
3jQuery(document).ready(function ($) {
4    var video = $('#video');
5    var audio = $('.audio');
6    var playButton = $('.play-button');
7    var endScreen = $('.end-screen'); // 終了時に表示するエリア
8    var resumeButton = $('.resume-video'); // 途中で停止した場合の再生ボタン
9    var replayButton = $('.replay-video'); // 動画終了後の「もう一度見る」ボタン
10
11    // 初期状態
12    playButton.show();
13    endScreen.removeClass('show'); // display: flex; にするクラス
14    resumeButton.hide();
15    replayButton.hide();
16    video.removeAttr('controls');
17
18    // 再生・停止の切り替え処理
19    function toggleVideoPlayback() {
20        if (video.get(0).paused) {
21            video.get(0).play();
22            playButton.fadeOut();
23            video.attr('controls', 'controls');
24            endScreen.removeClass('show'); // 非表示
25            resumeButton.hide();
26            replayButton.hide();
27            hideControlsAfterDelay();
28        } else {
29            video.get(0).pause();
30            // playButton.fadeIn();
31            video.removeAttr('controls');
32            endScreen.addClass('show'); // 表示
33            resumeButton.fadeIn();
34        }
35    }
36
37    // ボタン or 動画クリックで再生・停止
38    playButton.on('click touchstart', toggleVideoPlayback);
39    video.on('click touchstart', toggleVideoPlayback);
40
41    // 動画終了時に「次の動画へ」ボタンと「もう一度見る」ボタンを表示
42    video.on('ended', function () {
43        playButton.fadeIn();
44        video.removeAttr('controls');
45        endScreen.addClass('show'); // 表示
46        resumeButton.hide();
47        replayButton.fadeIn(); // 「もう一度見る」ボタン
48
49        // 修正:このvideo要素の親.main-videoにクラスを付与
50        if (window.innerWidth <= 900) {
51            $(this).closest('.main-video').addClass('end-screen-active');
52        }
53    });
54
55    // 「続きを再生する」ボタン
56    resumeButton.on('click touchstart', function () {
57        video.get(0).play();
58        playButton.fadeOut();
59        endScreen.removeClass('show');
60        resumeButton.hide();
61        replayButton.hide();
62        video.attr('controls', 'controls');
63        hideControlsAfterDelay();
64
65        // 修正:このvideo要素の親.main-videoからクラスを削除
66        if (window.innerWidth <= 900) {
67            video.closest('.main-video').removeClass('end-screen-active');
68        }
69    });
70
71    // 「もう一度見る」ボタン
72    replayButton.on('click touchstart', function () {
73        video.get(0).currentTime = 0;
74        video.get(0).play();
75        playButton.fadeOut();
76        endScreen.removeClass('show');
77        replayButton.hide();
78        video.attr('controls', 'contrsols');
79        hideControlsAfterDelay();
80
81        // 修正:このvideo要素の親.main-videoからクラスを削除
82        if (window.innerWidth <= 900) {
83            video.closest('.main-video').removeClass('end-screen-active');
84        }
85    });
86
87    // 一定時間後にコントロールバーを非表示
88    function hideControlsAfterDelay() {
89        setTimeout(function () {
90            if (!video.get(0).paused) {
91                video.removeAttr('controls');
92            }
93        }, 3000);
94    }
95});
96
97
98
99// JQuery(document).addEventListener('DOMContentLoaded', function () {
100document.addEventListener('DOMContentLoaded', function () {
101    // Toggle Mobile Navigation
102    const menuToggle = document.querySelector('.menu-toggle');
103    const navMenu = document.querySelector('.nav-menu');
104
105    if (menuToggle && navMenu) {
106        menuToggle.addEventListener('click', function () {
107            navMenu.classList.toggle('active');
108        });
109    }
110
111    // Like Button Functionality
112    const likeButtons = document.querySelectorAll('.like-button');
113    likeButtons.forEach(button => {
114        button.addEventListener('click', function () {
115            const videoId = this.dataset.videoId;
116            alert('Liked video with ID: ' + videoId);
117        });
118    });
119
120    // Scroll to Top
121    const scrollToTopBtn = document.querySelector('.scroll-to-top');
122    if (scrollToTopBtn) {
123        scrollToTopBtn.addEventListener('click', function () {
124            window.scrollTo({
125                top: 0,
126                behavior: 'smooth'
127            });
128        });
129    }
130});
131
132
133jQuery(document).ready(function($) {
134    // Enterのみで送信、Shift+Enterで改行
135    $(document).on('keydown', '.comment-form textarea', function(e) {
136        if (e.key === 'Enter' && !e.shiftKey) {
137            e.preventDefault();
138            $(this).closest('form').submit();
139        }
140    });
141
142    // コメントフォームのAjax送信
143    $(document).on('submit', '.comment-form', function(e) {
144        e.preventDefault();
145        var $form = $(this);
146        var formData = $form.serialize();
147
148        $.ajax({
149            url: $form.attr('action'),
150            type: 'POST',
151            data: formData + '&action=ajax_comment',
152            success: function(response) {
153                // コメントリストを再取得して差し替え
154                $.get(window.location.href, function(html) {
155                    var $newComments = $(html).find('.comment-list');
156                    $('.comment-list').replaceWith($newComments);
157                    // フォームのtextareaをクリア
158                    $form.find('textarea').val('');
159                    // コメントリストを一番下までスクロール(遅延させる)
160                    setTimeout(function() {
161                        var $commentList = $('.comment-list');
162                        if ($commentList.length) {
163                            $commentList.scrollTop($commentList[0].scrollHeight);
164                        }
165                    }, 100);
166                });
167            },
168            error: function() {
169                alert('コメント送信に失敗しました。');
170            }
171        });
172    });
173
174    // ページ読み込み時もコメントリストを一番下までスクロール(遅延させる)
175    setTimeout(function() {
176        var $commentList = $('.comment-list');
177        if ($commentList.length) {
178            $commentList.scrollTop($commentList[0].scrollHeight);
179        }
180    }, 100);
181});
182
183$.get(window.location.href, function(html) {
184    var $newComments = $(html).find('.comment-list');
185    if ($('.comment-list').length) {
186        // 既存リストがあれば差し替え
187        $('.comment-list').replaceWith($newComments);
188    } else {
189        // なければ、コメントリストをフォームの直前に挿入
190        $('.comment-form').before($newComments);
191    }
192    // フォームのtextareaをクリア
193    $form.find('textarea').val('');
194    // コメントリストを一番下までスクロール(遅延させる)
195    setTimeout(function() {
196        var $commentList = $('.comment-list');
197        if ($commentList.length) {
198            $commentList.scrollTop($commentList[0].scrollHeight);
199        }
200    }, 100);
201});
202
203

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.