PageSourceSearch

https://www.lopes.com.br/blog/wp-content/plugins/canvas/components…public-block-justified-gallery.js?ver=2.5.1

js lopes.com.br collected 2026-09-24 11:11:05 UTC 1,698 bytes, 59 lines download raw bytes

1/**
2 * Justified Gallery
3 */
4( function( $ ) {
5
6	function canvasInitJustifiedGallery() {
7
8		$( '.cnvs-gallery-type-justified:not(.cnvs-gallery-type-justified-ready)' ).imagesLoaded( function( instance ) {
9
10			$( instance.elements ).each( function( index, el ) {
11				var $el = $( el );
12				var data = $el.data();
13
14				$el.filter(':not(.cnvs-gallery-type-justified-ready)')
15					.addClass( 'cnvs-gallery-type-justified-ready' )
16					.justifiedGallery( {
17						rtl: !!canvasJG.rtl,
18						margins: data.jgMargins,
19						rowHeight: data.jgRowHeight,
20						maxRowHeight: data.jgMaxRowHeight,
21						lastRow: data.jgLastRow,
22						border: 0,
23						border: typeof data.jgBorder !== 'undefined' ? data.jgBorder : 0,
24						selector: 'figure',
25						captions: typeof data.jgCaptions !== 'undefined' ? data.jgCaptions : true,
26						randomize: typeof data.jgRandomize !== 'undefined' ? data.jgRandomize : false,
27						cssAnimation: true,
28						captionSettings: {
29							animationDuration: 100,
30							visibleOpacity: 1.0,
31							nonVisibleOpacity: 0.0
32						}
33					} ).on( 'jg.complete', function( e ) {
34
35						$el.addClass( 'justified-loaded' );
36
37						$( document.body ).trigger( 'image-load' );
38					} );
39			} );
40
41		} );
42	}
43
44	$( document ).ready( function() {
45		canvasInitJustifiedGallery();
46		$( document.body ).on( 'post-load', function() {
47			canvasInitJustifiedGallery();
48		} );
49
50		if ( 'undefined' !== typeof wp && 'undefined' !== typeof wp.hooks ) {
51			wp.hooks.addAction( 'canvas.components.serverSideRender.onChange', 'canvas/justified-gallery.init', function( props ) {
52				if ( 'canvas/justified-gallery' === props.block ) {
53					canvasInitJustifiedGallery();
54				}
55			} );
56		}
57	} );
58
59} )( jQuery );

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.