HEX
Server: LiteSpeed
System: Linux onyx.7ho.st 5.14.0-611.13.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 11 04:57:59 EST 2025 x86_64
User: atiscoir (1242)
PHP: 8.1.34
Disabled: show_source, system, shell_exec, passthru, exec, popen, proc_open
Upload Files
File: /home/atiscoir/public_html/wp-content/plugins/simple-history/js/review-notice.js
/* global simpleHistoryReviewNotice */

jQuery( document ).ready( function ( $ ) {
	const $dismissButton = $( '.simple-history-review-notice-dismiss-button' );

	// Handle click on "Maybe Later" button.
	$dismissButton.on( 'click', function ( e ) {
		e.preventDefault();
		dismissNotice();
	} );

	/**
	 * Send AJAX request to dismiss the notice.
	 */
	function dismissNotice() {
		const $notice = $dismissButton.closest( '.notice' );

		$.post( simpleHistoryReviewNotice.ajaxurl, {
			action: simpleHistoryReviewNotice.action,
			nonce: simpleHistoryReviewNotice.nonce,
		} )
			.done( function ( response ) {
				if ( response.success ) {
					$notice.fadeOut();
				}
			} )
			.fail( function () {
				// If AJAX call fails, at least hide the notice for current page view.
				$notice.fadeOut();
			} );
	}
} );