]> git.r.bdr.sh - rbdr/crowdantine/blobdiff - index.html
Update README
[rbdr/crowdantine] / index.html
index bc3f8b6e8f6c185d2a2ed6ebb8f35e06d9926244..69b0cb2dce3cbb869057a6b0163546c3d2afb9c6 100644 (file)
@@ -45,7 +45,9 @@
 
         const container = document.getElementById('proposals');
 
 
         const container = document.getElementById('proposals');
 
-        parsedResponse.result.items.forEach((proposal) => {
+        parsedResponse.result.items
+          .sort((a, b) => b.total_occurrences - a.total_occurrences)
+          .forEach((proposal) => {
 
           container.appendChild(generateProposalHTML(proposal));
         });
 
           container.appendChild(generateProposalHTML(proposal));
         });
   <body>
     <h1>Help me decide what to do during quarantine</h1>
     <p>Vote on the recommendations, or <a href="#add">add one</a>.</p>
   <body>
     <h1>Help me decide what to do during quarantine</h1>
     <p>Vote on the recommendations, or <a href="#add">add one</a>.</p>
-    <ul id="proposals"></ul>
+    <ol id="proposals"></ol>
     <h1 id="add">Add a recommendation</h1>
     <form>
       <p>
     <h1 id="add">Add a recommendation</h1>
     <form>
       <p>