Widget: DCTList: Difference between revisions

From LINKS Community Center
Jump to: navigation, search
Eschmidt (talk | contribs)
No edit summary
Eschmidt (talk | contribs)
No edit summary
Line 164: Line 164:
         ).then(response => response.json());
         ).then(response => response.json());
         const results = sourceResponse.query.results;
         const results = sourceResponse.query.results;
       
 
         return Object.keys(results).map(platform => {
         return Object.keys(results).map(platform => {
             const img = results[platform].printouts['IMAGE'][0];
             const img = results[platform].printouts['IMAGE'][0];
Line 182: Line 182:
             return printoutResult && printoutResult[0] && printoutResult[0].fulltext.toLowerCase() === 'yes'
             return printoutResult && printoutResult[0] && printoutResult[0].fulltext.toLowerCase() === 'yes'
         });
         });


         const functionsQuery = '[[Category:Function_category]]' +
         const functionsQuery = '[[Category:Function_category]]' +
Line 188: Line 187:
                               '|?Has_description=' + DESC_KEY;
                               '|?Has_description=' + DESC_KEY;


         const functionsQueryResponse = await fetch(
         const functionsQueryResponse = await fetch(getQueryUrl(functionsQuery)).then(response => response.json());
            queryBaseUrl + encodeURIComponent(functionsQuery)
        ).then(response => response.json());
         const functionsQueryResults = functionsQueryResponse.query.results;
         const functionsQueryResults = functionsQueryResponse.query.results;
          
          

Revision as of 14:42, 30 August 2022

Development verstion of the DCT List.
Not ready for production!