MCPcopy Create free account
hub / github.com/bmorcelli/Launcher / saveFile

Function saveFile

webUi/scripts.js:18–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16 xhr.send();
17}
18function saveFile() {
19 const xhr = new XMLHttpRequest();
20 xhr.open('POST', '/editfile?name=' + encodeURIComponent(editingFile));
21 xhr.setRequestHeader('Content-Type', 'text/plain');
22 xhr.onload = () => { _('status').innerHTML = xhr.responseText === 'OK' ? 'File saved!' : xhr.responseText; };
23 xhr.send(_('editor-content').value);
24}
25
26let _nvsData = null;
27const _nvsInts = new Set(['u8','i8','u16','i16','u32','i32','u64','i64']);

Callers

nothing calls this directly

Calls 1

_Function · 0.85

Tested by

no test coverage detected