Untitled
unknown
javascript
a year ago
541 B
4
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