WS_OK_7.4.33 HEX
HEX
Server: nginx/1.21.4
System: Linux v12674 6.8.0-85-generic #85-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep 18 15:26:59 UTC 2025 x86_64
User: endtheignorance (1014)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
Upload Files
File: /storage/v12674/lcaliceaunties/public_html/wp-content/plugins/simple-history/js/scripts.js
/**
 * When the clear-log-button in admin is clicked then check that users really wants to clear the log
 */
jQuery( '.js-SimpleHistory-Settings-ClearLog' ).on( 'click', function ( e ) {
	if ( ! confirm( simpleHistoryScriptVars.settingsConfirmClearLog ) ) {
		e.preventDefault();
	}
} );

/**
 * Handle dev mode toggle badge clicks (premium, experimental, etc.)
 */
jQuery( document ).ready( function ( $ ) {
	$( '.sh-PageHeader-badge--toggle' ).on( 'click', function ( e ) {
		e.preventDefault();

		const $button = $( this );
		const endpoint = $button.data( 'endpoint' );

		// Disable button during request.
		$button.prop( 'disabled', true );

		// Collect any extra data- attributes (e.g. data-plugin).
		const data = {};
		$.each( $button.data(), function ( key, value ) {
			if ( key !== 'endpoint' ) {
				data[ key ] = value;
			}
		} );

		wp.apiFetch( {
			path: '/simple-history/v1/dev-tools/' + endpoint,
			method: 'POST',
			data: data,
		} )
			.then( function () {
				window.location.reload();
			} )
			.catch( function ( error ) {
				alert( error.message || 'Toggle failed.' );
				$button.prop( 'disabled', false );
			} );
	} );
} );