Widget: DataExporter: Difference between revisions

From LINKS Community Center
Jump to: navigation, search
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 = JSON.stringify(usrData,2);
                 document.getElementById('output').innerText = usrName;
             }
             }
         </script>
         </script>

Revision as of 11:04, 15 August 2023