PageSourceSearch

https://vacation.farm/wp-content/plugins/citadela-directory/blocks…/src/frontend-js.js?ver=1740736877

js vacation.farm collected 2026-10-06 15:05:37 UTC 2,562 bytes, 82 lines download raw bytes

1jQuery(document).ready(function(){
2	"use strict";
3	setDirectoryItemsListImageData();
4	checkDirectoryItemsListWidth();
5});
6
7jQuery(window).resize(function(){
8	checkDirectoryItemsListWidth();
9});
10
11function checkDirectoryItemsListWidth () {
12	
13	const width = window.innerWidth;
14	
15	jQuery('.ctdl-directory-items-list.responsive-options').each(function(){
16		const $block = jQuery( this );
17		$block.trigger( 'screen-resized', [ width ] );
18	});
19}
20
21function setDirectoryItemsListImageData(){
22	jQuery('.ctdl-directory-items-list.responsive-options').each(function(){
23		const $block = jQuery( this );
24		const attrs = $block.data( 'block-mobile-attr' );   		
25		const breakpoint = $block.data( 'block-mobile-breakpoint' );
26
27		$block.on( 'screen-resized', function( event, width ){
28			$screen = 'desktop';
29			if( width < breakpoint ) $screen = 'mobile';
30
31			
32
33			if( attrs[$screen]['proportionalImageHeight'] ) {
34				$block.addClass('proportional-image-height');
35				$block.removeClass('default-image-height');
36				$block.removeClass('custom-image-height');
37				//remove image object position class
38				if( attrs['desktop']['imageObjectPosition'] ){
39					$block.removeClass(attrs['desktop']['imageObjectPosition']);
40				}
41				if( attrs['mobile']['imageObjectPosition'] ){
42					$block.removeClass(attrs['mobile']['imageObjectPosition']);
43				}
44			}else{
45				$block.removeClass('proportional-image-height');
46			}
47			
48			if( ! attrs[$screen]['proportionalImageHeight'] ) {
49				if( attrs[$screen]['imageHeightType'] == 'custom' ){
50					$block.addClass('custom-image-height');
51					$block.removeClass('default-image-height');
52				}
53				if( attrs[$screen]['imageHeightType'] == 'default' ){
54					$block.addClass('default-image-height');
55					$block.removeClass('custom-image-height');
56				}
57			}
58
59			if( attrs[$screen]['imageHeight'] && ! attrs[$screen]['proportionalImageHeight'] && attrs[$screen]['imageHeightType'] == 'custom' ) {
60				$block.find('.item-content').find('img.item-image').css( 'height', attrs[$screen]['imageHeight'] );
61			}else{
62				$block.find('.item-content').find('img.item-image').css( 'height', "" );
63			}
64
65			if( attrs[$screen]['imageObjectPosition'] ) {
66				if( $screen == 'desktop'){
67					$block.addClass(attrs['desktop']['imageObjectPosition']);
68					$block.removeClass(attrs['mobile']['imageObjectPosition']);
69				}
70				if( $screen == 'mobile'){
71					$block.addClass(attrs['mobile']['imageObjectPosition']);
72					$block.removeClass(attrs['desktop']['imageObjectPosition']);
73				}
74				
75			}
76
77		});
78		
79		$block.removeClass( "loading-content" );
80		
81	});
82}

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.