MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / deleteFile

Function deleteFile

web/scripts/ragnar_modern.js:13468–13502  ·  view source on GitHub ↗
(filePath)

Source from the content-addressed store, hash-verified

13466 return;
13467 }
13468 const removeCount = lines.length - limit;
13469 for (let i = 0; i < removeCount; i++) {
13470 lines[i].remove();
13471 }
13472}
13473
13474function getPwnLogLineClass(line = '') {
13475 const normalized = line.toLowerCase();
13476 if (normalized.includes('error') || normalized.includes('failed') || normalized.includes('[err')) {
13477 return 'text-red-300';
13478 }
13479 if (normalized.includes('warn')) {
13480 return 'text-yellow-200';
13481 }
13482 if (normalized.includes('info') || normalized.includes('[info')) {
13483 return 'text-blue-200';
13484 }
13485 return 'text-gray-200';
13486}
13487
13488function startPwnLogStreaming(options = {}) {
13489 const viewer = document.getElementById('pwn-log-viewer');
13490 if (!viewer) {
13491 return;
13492 }
13493 if (pwnLogStreamTimer) {
13494 return;
13495 }
13496 if (pwnLogStopTimeout) {
13497 clearTimeout(pwnLogStopTimeout);
13498 pwnLogStopTimeout = null;
13499 }
13500 pwnLogStreaming = true;
13501 setPwnLogIndicator(true);
13502 fetchPwnLogs({ initial: Boolean(options.initial) || pwnLogCursor === 0, silent: true });
13503 pwnLogStreamTimer = setInterval(() => fetchPwnLogs({ silent: true }), PWN_LOG_POLL_INTERVAL);
13504}
13505

Callers

nothing calls this directly

Calls 7

popMethod · 0.80
showFileConfirmModalFunction · 0.70
networkAwareFetchFunction · 0.70
showFileSuccessFunction · 0.70
refreshFilesFunction · 0.70
showFileErrorFunction · 0.70
closeFileModalFunction · 0.70

Tested by

no test coverage detected