$15 GRAYBYTE WORDPRESS FILE MANAGER $42

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/home/bqrcodec/contact.rohto.com.vn/wp-content/plugins/code-snippets-pro/js/edit/

HOME
Current File : /home/bqrcodec/contact.rohto.com.vn/wp-content/plugins/code-snippets-pro/js/edit//shortcode.ts
const updateShortcode = (options: HTMLCollectionOf<HTMLInputElement>) => {
	const isNetworkAdmin = -1 !== document.body.className.indexOf('network-admin')

	const snippetIdInput = document.querySelector<HTMLInputElement>('input[name=snippet_id]')
	const snippetId = snippetIdInput ? parseInt(snippetIdInput.value, 10) : 0

	let shortcode = '[code_snippet'

	if (snippetId) {
		shortcode += ` id=${snippetId}`
	}

	if (isNetworkAdmin) {
		shortcode += ' network=true'
	}

	for (const option of options) {
		if (option.checked) {
			shortcode += ` ${option.value}=true`
		}
	}

	shortcode += ']'

	const scopes = document.querySelector('.html-scopes-list')
	if (scopes) {
		const shortcodeScope = scopes.querySelector('.shortcode-tag')
		if (shortcodeScope) {
			shortcodeScope.textContent = shortcode
		}
	}
}

export const handleContentShortcodeOptions = () => {
	const options = document.querySelector('.html-shortcode-options')?.getElementsByTagName('input')

	if (options) {
		for (const option of options) {
			option.addEventListener('change', () => updateShortcode(options))
		}
	}
}

Current_dir [ WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
6 Mar 2024 12.54 PM
bqrcodec / bqrcodec
0755
clipboard.ts
0.704 KB
13 May 2025 5.01 PM
bqrcodec / bqrcodec
0644
editor.ts
1.2 KB
13 May 2025 5.01 PM
bqrcodec / bqrcodec
0644
shortcode.ts
1.064 KB
13 May 2025 5.01 PM
bqrcodec / bqrcodec
0644
tabs.ts
1.717 KB
13 May 2025 5.01 PM
bqrcodec / bqrcodec
0644
tags.ts
0.396 KB
13 May 2025 5.01 PM
bqrcodec / bqrcodec
0644
validate.ts
0.777 KB
13 May 2025 5.01 PM
bqrcodec / bqrcodec
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF