Untitled
unknown
javascript
5 months ago
541 B
2
Indexable
async function getNetcoachUser() { if(!window.netcoachendpoint) return null; const response = await fetch(window.netcoachendpoint); return response.json(); } async function useNetcoachUser() { const netcoachuser = await getNetcoachUser(); KNOW.sourceFactory.setConstructor('netcoachOptionEnabled',()=>{ return new KNOW_BaseSource( ()=>{ return netcoachuser?.option; }); }); KNOW.sourceFactory.setConstructor('version',()=>{ return new KNOW_BaseSource( ()=>{ return netcoachuser?.version; }); }); }
Editor is loading...
Leave a Comment