PageSourceSearch

https://onejane.github.io/js/fancybox.js?version=1.9.0

js onejane.github.io collected 2026-10-03 09:42:57 UTC 1,174 bytes, 49 lines download raw bytes

1$(function () {
2  var imgList = $('.recent-post-item img').not('.no-fancybox')
3  if (imgList.length === 0) {
4    imgList = $('#post-content img').not('.no-fancybox')
5  }
6  for (var i = 0; i < imgList.length; i++) {
7    var $a = $(
8      '<a href="' +
9        imgList[i].src +
10        '" data-fancybox="group" data-caption="' +
11        imgList[i].alt +
12        '" class="fancybox"></a>'
13    )
14    var alt = imgList[i].alt
15    var $wrap = $(imgList[i]).wrap($a)
16    if (alt) {
17      $wrap.after('<div class="img-alt">' + alt + '</div>')
18    }
19  }
20
21  $().fancybox({
22    selector: '[data-fancybox]',
23    loop: true,
24    transitionEffect: 'slide',
25    buttons: ['share', 'slideShow', 'fullScreen', 'download', 'thumbs', 'close']
26  })
27
28  var galleryItem = $('.gallery-item')
29  var galleryList = []
30  galleryItem.each(function (idx, elem) {
31    galleryList.push({
32      src: $(elem).data('url'),
33      opts: {
34        caption: $(elem).data('title')
35      }
36    })
37  })
38  galleryItem.on('click', function () {
39    $.fancybox.open(
40      galleryList,
41      {
42        loop: true,
43        transitionEffect: 'slide'
44      },
45      galleryItem.index(this)
46    )
47    return false
48  })
49})

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.