PageSourceSearch

https://ma-kjh.github.io/assets/js/common.js

js ma-kjh.github.io collected 2026-10-03 09:32:56 UTC 1,414 bytes, 42 lines download raw bytes

1// aHR0cHM6Ly9naXRodWIuY29tL2x1b3N0MjYvYWNhZGVtaWMtaG9tZXBhZ2U=
2$(function () {
3    lazyLoadOptions = {
4        scrollDirection: 'vertical',
5        effect: 'fadeIn',
6        effectTime: 300,
7        placeholder: "",
8        onError: function(element) {
9            console.log('[lazyload] Error loading ' + element.data('src'));
10        },
11        afterLoad: function(element) {
12            if (element.is('img')) {
13                // remove background-image style
14                element.css('background-image', 'none');
15                element.css('min-height', '0');
16            } else if (element.is('div')) {
17                // set the style to background-size: cover; 
18                element.css('background-size', 'cover');
19                element.css('background-position', 'center');
20            }
21        }
22    }
23
24    $('img.lazy, div.lazy:not(.always-load)').Lazy({visibleOnly: true, ...lazyLoadOptions});
25    $('div.lazy.always-load').Lazy({visibleOnly: false, ...lazyLoadOptions});
26
27    $('[data-toggle="tooltip"]').tooltip()
28
29    var $grid = $('.grid').masonry({
30        "percentPosition": true,
31        "itemSelector": ".grid-item",
32        "columnWidth": ".grid-sizer"
33    });
34    // layout Masonry after each image loads
35    $grid.imagesLoaded().progress(function () {
36        $grid.masonry('layout');
37    });
38
39    $(".lazy").on("load", function () {
40        $grid.masonry('layout');
41    });
42})

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.