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

Function displayDirectoryTree

web/scripts/ragnar_modern.js:13337–13363  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13335 tableHTML += '</tbody></table></div>';
13336
13337 if (hasMore) {
13338 tableHTML += `
13339 <div class="mt-4">
13340 <button onclick="togglePwnNetworksExpansion()"
13341 class="flex items-center justify-center w-full py-3 px-4 bg-gray-700 hover:bg-gray-600 rounded-lg transition-colors text-gray-300 hover:text-white">
13342 <span id="pwn-networks-expand-text">Show ${hiddenItems.length} more networks</span>
13343 <svg id="pwn-networks-expand-arrow" class="w-4 h-4 ml-2 transition-transform" fill="none" stroke="currentColor" viewBox="0 0 24 24">
13344 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
13345 </svg>
13346 </button>
13347 <div id="pwn-networks-hidden" class="hidden mt-2">
13348 <div class="overflow-x-auto">
13349 <table class="min-w-full divide-y divide-gray-700">
13350 <tbody class="divide-y divide-gray-700">`;
13351 hiddenItems.forEach(net => { tableHTML += networkRowHTML(net); });
13352 tableHTML += '</tbody></table></div></div></div>';
13353 }
13354 tableHTML += '</div>';
13355
13356 container.innerHTML = mobileHTML + tableHTML;
13357}
13358
13359function togglePwnNetworksExpansion() {
13360 /* Toggle both desktop and mobile overflow sections */
13361 [['pwn-networks-hidden', 'pwn-networks-expand-text', 'pwn-networks-expand-arrow'],
13362 ['pwn-networks-hidden-m', 'pwn-networks-expand-text-m', 'pwn-networks-expand-arrow-m']
13363 ].forEach(([hiddenId, textId, arrowId]) => {
13364 const hidden = document.getElementById(hiddenId);
13365 const text = document.getElementById(textId);
13366 const arrow = document.getElementById(arrowId);

Callers 2

loadFilesDataFunction · 0.70
refreshFilesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected