Widget: DCTList: Difference between revisions
From LINKS Community Center
Eschmidt (talk | contribs) No edit summary |
Eschmidt (talk | contribs) No edit summary |
||
Line 2: | Line 2: | ||
<includeonly> | <includeonly> | ||
<script> | <script> | ||
async function | async function getSources() { | ||
const sourceQuery = '/api.php?action=ask&format=json&query=' + encodeURIComponent('[[Category:Social media platform]]|?IMAGE'); | const sourceQuery = '/api.php?action=ask&format=json&query=' + encodeURIComponent('[[Category:Social media platform]]|?IMAGE'); | ||
const sourceResponse = await fetch(sourceQuery).then(response => response.json()); | const sourceResponse = await fetch(sourceQuery).then(response => response.json()); | ||
Line 22: | Line 22: | ||
console.log(sources) | console.log(sources) | ||
return sources; | |||
} | |||
async function getDcts() { | |||
const dctQuery = '/api.php?action=ask&format=json&query=' + encodeURIComponent('[[Category:Disaster Community Technology]]'); | |||
const dctResponse = await fetch(sourceQuery).then(response => response.json()); | |||
console.log(dctResponse); | |||
} | } | ||
getSources(); | |||
getDcts(); | |||
</script> | </script> | ||
</includeonly> | </includeonly> |
Revision as of 13:44, 2 June 2022
Development verstion of the DCT List.
Not ready for production!