���Root Mod By V1rus_Alfa
User / IP
:
216.73.217.78
Host / Server
:
195.214.235.115 / npln.ir
System
:
Linux damavand.pws-dns.net 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 4 05:23:43 EDT 2025 x86_64
Command
|
Upload
|
Mass Deface
|
Create
:
/
home2
/
cutunixc
/
.trash
/
node_modules
/
@iconify
/
utils
/
lib
/
svg
/
Viewing: pretty.mjs
const skipTags = ["script", "style"]; function prettifySVG(content, tab = " ", depth = 0) { let result = ""; let level = 0; content = content.replace(/(\s)*\/>/g, " />"); while (content.length > 0) { const openIndex = content.indexOf("<"); let closeIndex = content.indexOf(">"); if (openIndex === -1 && closeIndex === -1) { return result; } if (openIndex === -1 || closeIndex === -1 || closeIndex < openIndex) { return null; } const text = content.slice(0, openIndex); const trimmedText = text.trim(); if (trimmedText.length) { if (text.trimStart() !== text && text.trimEnd() !== text) { result += trimmedText + "\n" + tab.repeat(level + depth); } else { result = result.trim() + text; } } content = content.slice(openIndex); closeIndex -= openIndex; const lastChar = content.slice(closeIndex - 1, closeIndex); const isClosing = content.slice(0, 2) === "</"; let isSelfClosing = lastChar === "/" || lastChar === "?"; if (isClosing && isSelfClosing) { return null; } const tagName = content.slice(isClosing ? 2 : 1).split(/[\s>]/).shift(); const ignoreTagContent = !isSelfClosing && !isClosing && skipTags.includes(tagName); if (!ignoreTagContent) { const nextOpenIndex = content.indexOf("<", 1); if (nextOpenIndex !== -1 && nextOpenIndex < closeIndex) { return null; } } if (isClosing && tab.length) { if (result.slice(0 - tab.length) === tab) { result = result.slice(0, result.length - tab.length); } } result += content.slice(0, closeIndex + 1); content = content.slice(closeIndex + 1); if (ignoreTagContent) { const closingIndex = content.indexOf("</" + tagName); const closingEnd = content.indexOf(">", closingIndex); if (closingIndex < 0 || closingEnd < 0) { return null; } result += content.slice(0, closingEnd + 1); content = content.slice(closingEnd + 1); isSelfClosing = true; } if (isClosing) { level--; if (level < 0) { return null; } } else if (!isSelfClosing) { level++; } result += "\n" + tab.repeat(level + depth); } return level === 0 ? result : null; } export { prettifySVG };
Coded With 💗 by
0x6ick Mod By V1rus_Alfa