PHP 8.1.33
Preview: wp-embed-template.js Size: 6.62 KB
/home/jambtst2015/public_html/ida.org.ng/wp-includes/js/wp-embed-template.js

/**
 * @output wp-includes/js/wp-embed-template.js
 */
(function ( window, document ) {
	'use strict';

	var supportedBrowser = ( document.querySelector && window.addEventListener ),
		loaded = false,
		secret,
		secretTimeout,
		resizing;

	function sendEmbedMessage( message, value ) {
		window.parent.postMessage( {
			message: message,
			value: value,
			secret: secret
		}, '*' );
	}

	/**
	 * Send the height message to the parent window.
	 */
	function sendHeightMessage() {
		sendEmbedMessage( 'height', Math.ceil( document.body.getBoundingClientRect().height ) );
	}

	function onLoad() {
		if ( loaded ) {
			return;
		}
		loaded = true;

		var share_dialog = document.querySelector( '.wp-embed-share-dialog' ),
			share_dialog_open = document.querySelector( '.wp-embed-share-dialog-open' ),
			share_dialog_close = document.querySelector( '.wp-embed-share-dialog-close' ),
			share_input = document.querySelectorAll( '.wp-embed-share-input' ),
			share_dialog_tabs = document.querySelectorAll( '.wp-embed-share-tab-button button' ),
			featured_image = document.querySelector( '.wp-embed-featured-image img' ),
			i;

		if ( share_input ) {
			for ( i = 0; i < share_input.length; i++ ) {
				share_input[ i ].addEventListener( 'click', function ( e ) {
					e.target.select();
				} );
			}
		}

		function openSharingDialog() {
			share_dialog.className = share_dialog.className.replace( 'hidden', '' );
			// Initial focus should go on the currently selected tab in the dialog.
			document.querySelector( '.wp-embed-share-tab-button [aria-selected="true"]' ).focus();
		}

		function closeSharingDialog() {
			share_dialog.className += ' hidden';
			document.querySelector( '.wp-embed-share-dialog-open' ).focus();
		}

		if ( share_dialog_open ) {
			share_dialog_open.addEventListener( 'click', function () {
				openSharingDialog();
			} );
		}

		if ( share_dialog_close ) {
			share_dialog_close.addEventListener( 'click', function () {
				closeSharingDialog();
			} );
		}

		function shareClickHandler( e ) {
			var currentTab = document.querySelector( '.wp-embed-share-tab-button [aria-selected="true"]' );
			currentTab.setAttribute( 'aria-selected', 'false' );
			document.querySelector( '#' + currentTab.getAttribute( 'aria-controls' ) ).setAttribute( 'aria-hidden', 'true' );

			e.target.setAttribute( 'aria-selected', 'true' );
			document.querySelector( '#' + e.target.getAttribute( 'aria-controls' ) ).setAttribute( 'aria-hidden', 'false' );
		}

		function shareKeyHandler( e ) {
			var target = e.target,
				previousSibling = target.parentElement.previousElementSibling,
				nextSibling = target.parentElement.nextElementSibling,
				newTab, newTabChild;

			if ( 37 === e.keyCode ) {
				newTab = previousSibling;
			} else if ( 39 === e.keyCode ) {
				newTab = nextSibling;
			} else {
				return false;
			}

			if ( 'rtl' === document.documentElement.getAttribute( 'dir' ) ) {
				newTab = ( newTab === previousSibling ) ? nextSibling : previousSibling;
			}

			if ( newTab ) {
				newTabChild = newTab.firstElementChild;

				target.setAttribute( 'tabindex', '-1' );
				target.setAttribute( 'aria-selected', false );
				document.querySelector( '#' + target.getAttribute( 'aria-controls' ) ).setAttribute( 'aria-hidden', 'true' );

				newTabChild.setAttribute( 'tabindex', '0' );
				newTabChild.setAttribute( 'aria-selected', 'true' );
				newTabChild.focus();
				document.querySelector( '#' + newTabChild.getAttribute( 'aria-controls' ) ).setAttribute( 'aria-hidden', 'false' );
			}
		}

		if ( share_dialog_tabs ) {
			for ( i = 0; i < share_dialog_tabs.length; i++ ) {
				share_dialog_tabs[ i ].addEventListener( 'click', shareClickHandler );

				share_dialog_tabs[ i ].addEventListener( 'keydown', shareKeyHandler );
			}
		}

		document.addEventListener( 'keydown', function ( e ) {
			if ( 27 === e.keyCode && -1 === share_dialog.className.indexOf( 'hidden' ) ) {
				closeSharingDialog();
			} else if ( 9 === e.keyCode ) {
				constrainTabbing( e );
			}
		}, false );

		function constrainTabbing( e ) {
			// Need to re-get the selected tab each time.
			var firstFocusable = document.querySelector( '.wp-embed-share-tab-button [aria-selected="true"]' );

			if ( share_dialog_close === e.target && ! e.shiftKey ) {
				firstFocusable.focus();
				e.preventDefault();
			} else if ( firstFocusable === e.target && e.shiftKey ) {
				share_dialog_close.focus();
				e.preventDefault();
			}
		}

		if ( window.self === window.top ) {
			return;
		}

		// Send this document's height to the parent (embedding) site.
		sendHeightMessage();

		// Send the document's height again after the featured image has been loaded.
		if ( featured_image ) {
			featured_image.addEventListener( 'load', sendHeightMessage );
		}

		/**
		 * Detect clicks to external (_top) links.
		 */
		function linkClickHandler( e ) {
			var target = e.target,
				href;
			if ( target.hasAttribute( 'href' ) ) {
				href = target.getAttribute( 'href' );
			} else {
				href = target.parentElement.getAttribute( 'href' );
			}

			// Only catch clicks from the primary mouse button, without any modifiers.
			if ( event.altKey || event.ctrlKey || event.metaKey || event.shiftKey ) {
				return;
			}

			// Send link target to the parent (embedding) site.
			if ( href ) {
				sendEmbedMessage( 'link', href );
				e.preventDefault();
			}
		}

		document.addEventListener( 'click', linkClickHandler );
	}

	/**
	 * Iframe resize handler.
	 */
	function onResize() {
		if ( window.self === window.top ) {
			return;
		}

		clearTimeout( resizing );

		resizing = setTimeout( sendHeightMessage, 100 );
	}

	/**
	 * Message handler.
	 *
	 * @param {MessageEvent} event
	 */
	function onMessage( event ) {
		var data = event.data;

		if ( ! data ) {
			return;
		}

		if ( event.source !== window.parent ) {
			return;
		}

		if ( ! ( data.secret || data.message ) ) {
			return;
		}

		if ( data.secret !== secret ) {
			return;
		}

		if ( 'ready' === data.message ) {
			sendHeightMessage();
		}
	}

	/**
	 * Re-get the secret when it was added later on.
	 */
	function getSecret() {
		if ( window.self === window.top || !!secret ) {
			return;
		}

		secret = window.location.hash.replace( /.*secret=([\d\w]{10}).*/, '$1' );

		clearTimeout( secretTimeout );

		secretTimeout = setTimeout( function () {
			getSecret();
		}, 100 );
	}

	if ( supportedBrowser ) {
		getSecret();
		document.documentElement.className = document.documentElement.className.replace( /\bno-js\b/, '' ) + ' js';
		document.addEventListener( 'DOMContentLoaded', onLoad, false );
		window.addEventListener( 'load', onLoad, false );
		window.addEventListener( 'resize', onResize, false );
		window.addEventListener( 'message', onMessage, false );
	}
})( window, document );

Directory Contents

Dirs: 11 × Files: 100

Name Size Perms Modified Actions
- drwxr-xr-x 2024-11-22 17:53:10
Edit Download
crop DIR
- drwxr-xr-x 2024-11-22 17:53:10
Edit Download
dist DIR
- drwxr-xr-x 2024-11-22 17:53:10
Edit Download
- drwxr-xr-x 2024-11-22 17:53:10
Edit Download
jcrop DIR
- drwxr-xr-x 2024-11-22 17:53:10
Edit Download
jquery DIR
- drwxr-xr-x 2024-11-22 17:53:10
Edit Download
- drwxr-xr-x 2024-11-22 17:53:10
Edit Download
plupload DIR
- drwxr-xr-x 2024-11-22 17:53:10
Edit Download
swfupload DIR
- drwxr-xr-x 2024-11-22 17:53:10
Edit Download
thickbox DIR
- drwxr-xr-x 2024-11-22 17:53:10
Edit Download
tinymce DIR
- drwxr-xr-x 2024-11-22 17:53:10
Edit Download
10.30 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
3.41 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
3.25 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
1023 B lrw-r--r-- 2024-11-22 17:53:10
Edit Download
21.95 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
5.67 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
78.51 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
23.71 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
26.18 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
8.80 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
28.40 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
16.13 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
12.22 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
2.96 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
25.22 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
7.67 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
7.72 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
3.47 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
6.66 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
3.59 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
14.67 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
4.92 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
22.71 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
7.64 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
27.30 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
10.45 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
32.55 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
10.44 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
4.95 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
2.39 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
23.49 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
5.81 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
1.68 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
7.06 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
1.46 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
5.39 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
17.99 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
3.07 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
23.57 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
25.24 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
9.54 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
24.39 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
11.78 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
28.44 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
10.63 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
26.18 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
12.95 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
42.74 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
12.98 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
266.87 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
108.02 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
22.07 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
10.87 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
10.51 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
2.58 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
9.99 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
4.85 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
3.21 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
32.16 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
15.42 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
67.12 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
18.44 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
4.56 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
1.82 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
3.75 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
2.45 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
45.88 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
14.34 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
4.11 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
1.62 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
14.88 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
2.97 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
10.22 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
4.34 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
6.62 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
3.10 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
3.14 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
1.22 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
11.92 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
2.86 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
18.29 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
8.76 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
2.82 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
970 B lrw-r--r-- 2024-11-22 17:53:10
Edit Download
597 B lrw-r--r-- 2024-11-22 17:53:10
Edit Download
24.72 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
7.34 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
9.99 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
3.54 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
1.32 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
458 B lrw-r--r-- 2024-11-22 17:53:10
Edit Download
4.57 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
1.39 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
569 B lrw-r--r-- 2024-11-22 17:53:10
Edit Download
281 B lrw-r--r-- 2024-11-22 17:53:10
Edit Download
20.74 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
11.05 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download
821 B lrw-r--r-- 2024-11-22 17:53:10
Edit Download
351 B lrw-r--r-- 2024-11-22 17:53:10
Edit Download
802.97 KB lrw-r--r-- 2024-11-22 17:53:10
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).