MCPcopy Create free account
hub / github.com/davidkingzyb/SCAST / initFile

Function initFile

js/common.js:186–197  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

184}
185
186function initFile(){
187 var q = RegExp('[?&]file=([^&]*)').exec(location.href);
188 var file=q && decodeURIComponent(q[1].replace(/\+/g, ' '))
189 if(file){
190 console.log('file',file)
191 fetch('/rawtext?file='+file,{method:'GET'}).then(resp=>{
192 return resp.text()
193 }).then(text=>{
194 loadAstJson(text)
195 })
196 }
197}
198
199// ========= Mermaid & FDP ===========
200var gMermaidScale=1

Callers

nothing calls this directly

Calls 3

loadAstJsonFunction · 0.85
textMethod · 0.80
execMethod · 0.45

Tested by

no test coverage detected