SILENT KILLERPanel

Current Path: > home > codekrsu > > shopceylon.store > wp-content > plugins > code-snippets > > js > services > manage


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: /home/codekrsu//shopceylon.store/wp-content/plugins/code-snippets//js/services/manage

NameTypeSizeLast ModifiedActions
activation.ts File 2364 bytes February 14 2025 13:16:14.
cloud.ts File 1538 bytes November 27 2024 21:52:46.
index.ts File 170 bytes November 27 2024 21:52:46.
priority.ts File 740 bytes November 27 2024 21:52:46.
requests.ts File 1765 bytes November 27 2024 21:52:46.

Reading File: /home/codekrsu//shopceylon.store/wp-content/plugins/code-snippets//js/services/manage/cloud.ts

import Prism from 'prismjs'
import 'prismjs/components/prism-clike'
import 'prismjs/components/prism-javascript'
import 'prismjs/components/prism-css'
import 'prismjs/components/prism-php'
import 'prismjs/components/prism-markup'
import 'prismjs/plugins/keep-markup/prism-keep-markup'

/**
 * Handle clicks on snippet preview button.
 */
export const handleShowCloudPreview = () => {
	const previewButtons = document.querySelectorAll('.cloud-snippet-preview')

	previewButtons.forEach(button => {
		button.addEventListener('click', () => {
			const snippetId = button.getAttribute('data-snippet')
			const snippetLanguage = button.getAttribute('data-lang')

			const snippetCodeInput = <HTMLInputElement | null> document.getElementById(`cloud-snippet-code-${snippetId}`)
			const snippetCodeModalTag = document.getElementById('snippet-code-thickbox')

			if (!snippetCodeModalTag || !snippetCodeInput) {
				return
			}

			snippetCodeModalTag.classList.remove(...snippetCodeModalTag.classList)
			snippetCodeModalTag.classList.add(`language-${snippetLanguage}`)
			snippetCodeModalTag.textContent = snippetCodeInput.value

			if ('markup' === snippetLanguage) {
				snippetCodeModalTag.innerHTML = `<xmp>${snippetCodeInput.value}</xmp>`
			}

			if ('php' === snippetLanguage) {
				// Check if there is an opening php tag if not add it.
				if (!snippetCodeInput.value.startsWith('<?php')) {
					snippetCodeModalTag.textContent = `<?php\n${snippetCodeInput.value}`
				}
			}

			Prism.highlightElement(snippetCodeModalTag)
		})
	})
}

SILENT KILLER Tool