PageSourceSearch

https://hp.couloge.co.jp/js/libs/template/template-kuroko.js?1790211972

js couloge.co.jp collected 2026-09-24 13:51:09 UTC 2,561 bytes, 63 lines download raw bytes

1/**
2 * 必要に応じてペライチクレジットを表示する
3 * @param {Element} target 表示対象DOM
4 * @param {int} sectionNum ペライチセクション数
5 * @param {int} nextIndex 現在表示しているペライチセクションのインデックス
6 */
7function showPeraichiCreditIfNeed(target, sectionNum, prevIndex, nextIndex) {
8    if (!target) return;
9    var THRESHOLD_OF_PERAICHI_CREDIT_SHOWING = 0.7,
10        needShowPeraichiCredit = nextIndex >= Math.round(sectionNum * THRESHOLD_OF_PERAICHI_CREDIT_SHOWING);
11    target.className = needShowPeraichiCredit ? 'show' : '';
12}
13
14$(document).ready(function() {
15    var anchors,
16        navigations;
17
18    $('.kuroko-header').toggleClass('pera1-section', false);
19    $('.kuroko-menu__button').toggleClass('pera1-section', false);
20    $('.kuroko-menu__wrapper').toggleClass('pera1-section', false);
21    $('.pera1-section').wrapAll('<div id="fullpage"></div>');
22    $('.kuroko-menu__button').on('click', function() {
23        $('.kuroko-menu__wrapper, .kuroko-menu__button').toggleClass('is-active');
24    });
25    $('.kuroko-menu a[href^="#"]').on('click', function(e) {
26        var scrollTo = e.target.hash.replace('-', '_');
27        $('#fp-nav li a[href="' + scrollTo + '"]').click();
28        $('.kuroko-menu__wrapper, .kuroko-menu__button').removeClass('is-active');
29        return false;
30    });
31
32    anchors = $('.pera1-section').map(function() {
33        // fullPage.jsの仕様上、`anchors`と`id`は異なる値である必要があるので、anchorへ割り当てる値を`section_N`とする
34        return $(this).attr('id').replace('-', '_');
35    }).toArray();
36
37    navigations = $('.kuroko-menu > li').map(function() {
38        return $(this).text();
39    }).toArray();
40
41    $('#fullpage').fullpage({
42        sectionSelector: '.pera1-section',
43        paddingTop: '50px',
44        paddingBottom: '10px',
45        scrollingSpeed: 1000,
46        responsiveWidth: 768,
47        easing: 'easeInOutCubic',
48        easingcss3: 'ease',
49        menu: '#menu',
50        anchors: anchors,
51        //●のnavigation
52        navigation: true,
53        navigationPosition: 'right',
54        navigationTooltips: navigations,
55        showActiveTooltip: true,
56        continuousVertical: true,
57        bigSectionsDestination: 'top',
58        onLeave: showPeraichiCreditIfNeed.bind(null, document.getElementById('footer-created'), anchors.length),
59        afterLoad: function(anchorLink, index){
60            $('[data-anchor = ' + anchorLink + '] .kuroko-animation').addClass('active');
61        }
62    });
63});

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.