Difference between revisions of "Widget:DataExporter"
From LINKS Community Center
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> |