PageSourceSearch

https://showcase.kumparan.com/addons/default/themes/showcase/js/script.js

js kumparan.com collected 2026-09-24 08:55:01 UTC 2,600 bytes, 96 lines download raw bytes

1$(document).ready(function() {
2    
3    $('p').filter(function () { return this.innerHTML == "" }).remove();
4    
5    $('#navbarNav a.nav-link').click(function(event) {
6        var clickover = $(event.target);
7        var _opened = $(".navbar-collapse").hasClass("show");
8        if (_opened === true && !clickover.hasClass("navbar-toggler")) {
9            $(".navbar-toggler").click();
10        }
11    });
12
13    setTimeout(() => {
14        $('.triming').dotdotdot();
15    }, 500);
16    
17    function stickyInit() {
18        if($(window).width() > 768) {
19            $("#sticker").sticky({topSpacing:$('header').height() + 40});
20        } else {
21            $("#sticker").unstick();
22        }            
23    }
24
25    stickyInit();
26
27    $(window).resize(function () { 
28        stickyInit();
29    });
30
31    $('.share-area-sticky').each(function (index, element) {
32        $(this).cShare({
33            showButtons: [
34                'whatsapp',
35                'twitter',
36                'fb',
37                // 'copy'
38            ]
39        });
40    });
41
42    $('.share-area-kumparan').each(function (index, element) {
43        $(this).cShare({
44            showButtons: [
45                'kumparan',
46                // 'copy'
47            ]
48        });
49    });
50
51    $('body').on('click', '.navbar-toggler', function() {
52        $(".menu-overlay").fadeIn(500);
53    });
54    
55    $('body').on('click', '.dropdown-toggle', function(e) {
56        if($(window).width() <= 768) {
57            e.preventDefault();
58        }
59    });
60    
61    $(".menu-overlay").click(function(event) {
62        $(".navbar-toggler").trigger("click");
63        $(".menu-overlay").fadeOut(500);
64    });
65    
66    $('body').on('click', '.close-nav', function(e) {
67        e.preventDefault();
68        $(".navbar-toggler").trigger("click");
69        $(".menu-overlay").fadeOut(500);
70    });
71
72    $('body').on('click', '.search-btn', function(e) {
73        e.preventDefault();
74        $(".search-area").slideToggle('fast');
75        $( ".search-area input[name='query']" ).focus();
76    });
77
78    $(window).scroll(function () { 
79        if($(window).width() <= 768) {
80            $(".search-area").slideUp('fast');
81        }
82    });
83
84    $(window).on('load', function() {
85        $('img').addClass(function() {
86            if (this.height === this.width) {
87                return 'square';
88            } else if (this.height > this.width) {
89                return 'tall';
90            } else {
91                return 'wide';
92            }
93        });
94    });
95});
96

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.