count-blog-posts.js (272B) - raw
1 var file; 2 fetch('/common/blog_index.shtml') 3 .then(response => response.text()) 4 .then((data) => { 5 var match = data.match(/\r?\n/g); 6 // alert(match.length); 7 var content = document.getElementById('blog-entries'); 8 content.innerHTML += " (" + match.length + ")"; 9 })