PageSourceSearch

https://xianyulaodi.github.io/js/fancybox.js?v=0.0.0

js xianyulaodi.github.io collected 2026-10-03 10:11:33 UTC 708 bytes, 19 lines download raw bytes

1$(document).ready(function() {
2  $('img').each(function() {
3    if ($(this).parent().hasClass('fancybox')) return;
4    if ($(this).hasClass('nofancybox')) return;
5    var alt = this.alt;
6    if (alt) $(this).after('<span class="caption">' + alt + '</span>');
7    $(this).wrap('<a href="' + ($(this).attr('data-src') == null ? this.src : $(this).attr('data-src')) + '" title="' + alt + '" class="fancybox"></a>');
8  });
9  $(this).find('.fancybox').each(function(){
10    $(this).attr('rel', 'article');
11  });
12});
13$(document).ready(function() {
14  $("a[href$='.jpg'],a[href$='.png'],a[href$='.gif'],a[href$='.webp']").attr('rel', 'gallery').fancybox({
15    helpers : {
16    title: { type: 'inside'}
17    }
18  });
19});

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.