diff --git a/.gitignore b/.gitignore index 96dfbaf..81055c6 100755 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ projects /humo /images reviews.csv + diff --git a/blog/submit-comment.js b/blog/submit-comment.js new file mode 100644 index 0000000..ee31f82 --- /dev/null +++ b/blog/submit-comment.js @@ -0,0 +1,20 @@ +let commentForm = document.getElementById("commentForm"); + + +commentForm.addEventListener("submit", (e) => { + e.preventDefault(); + + let name = document.getElementById("name") + let comment = document.getElementById("comment") + + console.log(name.value) + console.log(comment.value) + + let post = name.name // The post number ie 0 is stored in the name tag of the input field + + comments[post].push(`${name.value}: ${comment.value}`) + console.log(comments) + + $.post('/comment', { comment: comment.value }) + $.post('/name', { name: name.value }) +}); diff --git a/video/videos.js b/video/videos.js index 03a4805..16dc60b 100755 --- a/video/videos.js +++ b/video/videos.js @@ -1,4 +1,4 @@ -let videos = [["aoh2-cherokee-part3.mp4","2024-05-26T15:31:10.667Z"],["stopit-getsomehelpdrives.mp4","2024-05-26T15:31:10.519Z"],["best-linux-game(virbox).mp4","2024-05-26T15:31:10.503Z"],["SPEEDUP332nd battlepack-stopmotion.mp4","2024-05-26T15:31:10.487Z"],["aoh2-cherokee-part2.mp4","2024-05-26T15:31:10.395Z"],["fastfetch.mp4","2024-05-26T15:31:10.239Z"],["iwbtg1.mp4","2024-05-26T15:31:10.231Z"],["conquest-of-america.mp4","2024-05-26T15:31:10.207Z"],["aoh2-cherokee.mp4","2024-05-26T15:31:10.147Z"],["Linus drops the hard R.mp4","2024-05-26T15:31:10.111Z"]] +let videos = [["aoh2-cherokee-part3.mp4","2024-08-18T22:13:05.766Z"],["stopit-getsomehelpdrives.mp4","2024-08-18T22:13:05.630Z"],["best-linux-game(virbox).mp4","2024-08-18T22:13:05.610Z"],["SPEEDUP332nd battlepack-stopmotion.mp4","2024-08-18T22:13:05.598Z"],["aoh2-cherokee-part2.mp4","2024-08-18T22:13:05.514Z"],["fastfetch.mp4","2024-08-18T22:13:05.370Z"],["iwbtg1.mp4","2024-08-18T22:13:05.362Z"],["conquest-of-america.mp4","2024-08-18T22:13:05.342Z"],["aoh2-cherokee.mp4","2024-08-18T22:13:05.278Z"],["Linus drops the hard R.mp4","2024-08-18T22:13:05.242Z"]] if (typeof module !== 'undefined' && module.exports) { module.exports = videos;