HEX
Server: Apache
System: Linux 4801f1b1.ptr.provps.com 6.17.8-1.el9.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Nov 13 18:02:25 EST 2025 x86_64
User: nassaugo (1004)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/nassaugo/public_html/wp-content/plugins/git-updater/js/ghu-install.js
/**
 * Javascript to show and hide the API specific settings
 * for the remote install feature.
 *
 * @class  Fragen\GitHub_Updater\Install
 * @since  4.6.0
 * @access public
 * @package	git-updater
 */

jQuery( document ).ready(
	function ($) {
		// Hide non-default (Bitbucket & GitLab) settings on page load.
		$.each(
			['bitbucket', 'gitlab', 'gitea', 'zipfile'],
			function () {
				$( 'input.'.concat( this, '_setting' ) ).parents( 'tr' ).hide();
			}
		);

		// When the api selector changes.
		$( 'select[ name="github_updater_api" ]' ).on(
			'change',
			function () {

				// create difference array.
				var hideMe = $( ['github', 'bitbucket', 'gitlab', 'gitea', 'zipfile'] ).not( [this.value] ).get();

				/*
				* Show/hide all settings that have the selected api's class.
				* this.value equals either 'github', 'bitbucket', or 'gitlab'.
				*/
				$.each(
					hideMe,
					function () {
						$( 'input.'.concat( this, '_setting' ) ).parents( 'tr' ).hide();
					}
				);

				$( 'input.'.concat( this.value, '_setting' ) ).parents( 'tr' ).show();

			}
		);
	}
);