HEX
Server: Apache
System: Linux nc-ph-0707-26.instaforreviews.com 3.10.0-1160.119.1.el7.tuxcare.els13.x86_64 #1 SMP Fri Nov 22 06:29:45 UTC 2024 x86_64
User: qirgxuo4hkuv (1004)
PHP: 8.3.27
Disabled: NONE
Upload Files
File: /home/qirgxuo4hkuv/public_html/shovago.com/wp-content/themes/ShovaGo copy/inc/meta-box/js/oembed.js
jQuery( function ( $ ) {
	'use strict';

	/**
	 * Show preview of oembeded media.
	 */
	function showPreview( e ) {
		e.preventDefault();

		var $this = $( this ),
			$spinner = $this.siblings( '.spinner' ),
			data = {
				action: 'rwmb_get_embed',
				url: $this.siblings( 'input' ).val()
			};

		$spinner.css( 'visibility', 'visible' );
		$.post( ajaxurl, data, function ( r ) {
			$spinner.css( 'visibility', 'hidden' );
			$this.siblings( '.rwmb-embed-media' ).html( r.data );
		}, 'json' );
	}

	/**
	 * Remove oembed preview when cloning.
	 */
	function removePreview() {
		$( this ).siblings( '.rwmb-embed-media' ).html( '' );
	}

	// Show oembeded media when clicking "Preview" button
	$( 'body' ).on( 'click', '.rwmb-embed-show', showPreview );

	// Remove oembed preview when cloning
	$( '.rwmb-input' ).on( 'clone', '.rwmb-oembed', removePreview );
} );