You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@annotator.apache.org by bi...@apache.org on 2020/07/16 18:55:51 UTC

[incubator-annotator-website] branch asf-site updated: Increase list posts to 10

This is an automated email from the ASF dual-hosted git repository.

bigbluehat pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/incubator-annotator-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new 33ccf34  Increase list posts to 10
33ccf34 is described below

commit 33ccf342269d003ddbc11b63ae5745a25e9801a8
Author: Benjamin Young <by...@wiley.com>
AuthorDate: Thu Jul 16 14:54:32 2020 -0400

    Increase list posts to 10
    
    Use a constant at the top for more descriptivenesses.
---
 content/index.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/content/index.js b/content/index.js
index 963d0fb..6613d91 100644
--- a/content/index.js
+++ b/content/index.js
@@ -1,5 +1,6 @@
 // Uses the PonyMail API to gather remote list of recent messages
 const recent_messages_url = 'https://lists.apache.org/api/stats.lua?list=dev&domain=annotator.apache.org';
+const display_count = 10;
 
 let a = document.createElement('a');
 a.className = 'item';
@@ -12,7 +13,7 @@ fetch(recent_messages_url)
   .then((msgs) => {
     if ('emails' in msgs && msgs.emails.length > 0) {
       msgs.emails.reverse();
-      for (let i = 0; i < 5; i++) {
+      for (let i = 0; i < display_count; i++) {
         let _a = a.cloneNode(a);
         _a.href = 'https://lists.apache.org/thread.html/' + msgs.emails[i].id;
         _a.textContent = msgs.emails[i].subject;