')}
`.trim(); if (isPrepend) { document.getElementById("comment-container").prepend(newItem); } else { document.getElementById("comment-container").append(newItem); } fadeIn(newItem); visibleComments.push(element);hide("no-comments"); show("num-comments-displayed"); };function reloadComments() {var sqlStatement = encodeURIComponent(`SELECT A, C, D, E WHERE B = '${thisPageUrl}'`); fetch(`https://docs.google.com/spreadsheets/d/1w5y95AH-4G8Z6Ru6DHYYBDY6-6RCMrg8rTh17U6_Oek/gviz/tq?tqx=out:csv&sheet=comments&tq=${sqlStatement}&headers=0`) .then(response => response.text()) .then(response => displayComments(response)); };const encodeFormData = (data) => { return Object.keys(data) .map(key => encodeURIComponent(key) + '=' + encodeURIComponent(data[key])) .join('&'); };function getCommentContent() { var comment = getValue("comment-comment")?.toString(); var extraCommentInfo = {};var replyToCommentId = document?.getElementById("reply-to-comment-id")?.text; if (replyToCommentId != null && replyToCommentId != "") { extraCommentInfo.replyToCommentId = replyToCommentId; }if (Object.keys(extraCommentInfo).length !== 0) { comment = EXTRA_INFO_START + JSON.stringify(extraCommentInfo) + EXTRA_INFO_END + comment; } return comment; };function postComment(recaptchaToken) { disablePostCommentButton(); var username = getValue("comment-name"); var comment = getCommentContent(); fetch(`https://docs.google.com/forms/d/e/1FAIpQLSdSgNIaBCRCZQgKoyuQ0rLxA8VJyHl8i265jzA--jwGrsYc6Q/formResponse`, { method: 'POST', mode: 'no-cors', headers: { "Content-Type": "application/x-www-form-urlencoded" }, body: encodeFormData({ "entry.98120567" : thisPageUrl?.toString(), "entry.1707311907" : username?.toString(), "entry.664237966" : comment?.toString() }) }).then(response => { setValue("comment-name", ''); setValue("comment-comment", '');clearCommentReplyItem();reloadComments(); }) .catch(error => {console.log(error);}) .finally(() => { enablePostCommentButton(); }); return false; };initialCommentLoad();
There are currently no comments on this article, be the first to comment below!
Add a Comment
Please be respectful! Comments may be removed at any time. 🧑⚖️