Widget: DataExporter: Difference between revisions
From LINKS Community Center
Eschmidt (talk | contribs) No edit summary |
Eschmidt (talk | contribs) No edit summary |
||
Line 14: | Line 14: | ||
async function exportData() { | async function exportData() { | ||
const usrData = await fetch(usr).then(rsp => rsp.json()); | const usrData = await fetch(usr).then(rsp => rsp.json()); | ||
const usrName = usrData?.query?.userinfo?.name; | |||
console.log(usrData) | console.log(usrData) | ||
document.getElementById('output').innerText = | document.getElementById('output').innerText = usrName; | ||
} | } | ||
</script> | </script> |