'' + '' + ''; } }); html += ''; document.getElementById('content').innerHTML = html; }).catch(function(e) { toast('Load failed: ' + e.message, false); }); } function buildBreadcrumb(path) { var parts = path.split('/').filter(Boolean); var html = '🏠'; var accumulated = ''; parts.forEach(function(part) { accumulated += '/' + part; var p = accumulated; html += ' /' + esc(part) + ''; }); return html; } function esc(s) { var d=document.createElement('div');d.textContent=s;return d.innerHTML; } // === File Operations === function edit(path) { editorPath = path; document.getElementById('editorTitle').textContent = 'Edit: ' + path.split('/').pop()