MCPcopy Create free account
hub / github.com/error311/FileRise / resolveActiveSourceId

Function resolveActiveSourceId

public/js/fileEditor.js:106–120  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

104}
105
106function resolveActiveSourceId() {
107 try {
108 if (typeof window.__frGetActiveSourceId === 'function') {
109 const v = window.__frGetActiveSourceId();
110 if (v) return String(v).trim();
111 }
112 } catch (e) { /* ignore */ }
113 const sel = document.getElementById('sourceSelector');
114 if (sel && sel.value) return String(sel.value).trim();
115 try {
116 const stored = localStorage.getItem('fr_active_source');
117 if (stored) return String(stored).trim();
118 } catch (e) { /* ignore */ }
119 return '';
120}
121
122function isRemoteSourceId(sourceId) {
123 const id = String(sourceId || '').trim();

Callers 1

saveFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected