# speechkit/7.0.0/src/editor/components/inspect-panel/js/inspect.js

BeyondWords – AI audio for publishers, version 7.0.0. 66 lines.

- Page: https://pluginprobe.com/plugins/speechkit/7.0.0/code/src/editor/components/inspect-panel/js/inspect.js
- Raw: https://pluginprobe.com/plugins/speechkit/7.0.0/raw/src/editor/components/inspect-panel/js/inspect.js
- Modified: 2026-08-12T09:46:22+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/speechkit/7.0.0/code/src/editor/components/inspect-panel/js/inspect.js#L10-L20`.

```javascript
/* global ClipboardJS */

/*
 * Classic-editor Inspect panel: copy-to-clipboard confirmation + "Remove all
 * BeyondWords data" toggle.
 */
( function () {
	'use strict';

	function init() {
		const copyButton = document.getElementById(
			'beyondwords__inspect--copy'
		);

		if ( copyButton && typeof ClipboardJS !== 'undefined' ) {
			const clipboard = new ClipboardJS( '#beyondwords__inspect--copy' );

			clipboard.on( 'success', function () {
				const confirm = document.getElementById(
					'beyondwords__inspect--copy-confirm'
				);
				if ( confirm ) {
					confirm.style.display = '';
				}
			} );
		}

		document.addEventListener( 'click', function ( event ) {
			if ( ! event.target.closest( '#beyondwords__inspect--remove' ) ) {
				return;
			}

			/* eslint-disable-next-line no-alert */
			const confirmed = window.confirm(
				wp.i18n.__(
					'Remove all BeyondWords data when the post is saved?',
					'speechkit'
				)
			);

			if ( ! confirmed ) {
				return;
			}

			const deleteInput = document.getElementById(
				'beyondwords_delete_content'
			);
			if ( deleteInput ) {
				deleteInput.removeAttribute( 'disabled' );
			}

			document
				.querySelectorAll( '[data-beyondwords-metavalue]' )
				.forEach( ( el ) => {
					el.value = '';
				} );
		} );
	}

	if ( document.readyState !== 'loading' ) {
		init();
	} else {
		document.addEventListener( 'DOMContentLoaded', init );
	}
} )();

```
