From a167c51c71ab4ed6ddd3f3a3a48202562912f3db Mon Sep 17 00:00:00 2001 From: modeht Date: Mon, 11 Apr 2022 07:01:28 +0200 Subject: [PATCH] removeing unnecessary comment --- public/frontend_js/quiz-test.js | 39 +-------------------------------- 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/public/frontend_js/quiz-test.js b/public/frontend_js/quiz-test.js index 14a17a4..7aa3e9d 100644 --- a/public/frontend_js/quiz-test.js +++ b/public/frontend_js/quiz-test.js @@ -732,12 +732,10 @@ async function nextQuestion(goBack, goBackFromResponse, fromDependedOn) { $("#page5 .container .row .createdByDiv").append(` Created By ${tempName} `); - } //displaying user name on top ends here + } - // first getting the first quiz totalQuizQuestions = allItems[currentQuizIndex].questions; - // checking if there is any resp onse in question or answer if (currentQuestionCounter != 0) { apiQues = totalQuizQuestions.find((ques) => ques.id == lastShowedQuestionId); let lastAnswerObject = dataToReturn.find(function (ansObj) { @@ -748,39 +746,8 @@ async function nextQuestion(goBack, goBackFromResponse, fromDependedOn) { var fullAnswerObject = apiQues.answers.find(function (cAns) { return cAns.answer == lastAnswerObject.answer; }); - // quesResponse = apiQues.response; - //when there is response with the question if (apiQues.id == 14) { - //save progress if there is answer - if (lastAnswerObject.answer) { - //ajax save contact - // const email = lastAnswerObject.answer; - // let fullName = localStorage.getItem("name"); - // let firstName, lastName; - // if (fullName && fullName !== "You") firstName = fullName.split(" ")[0]; - // if (fullName && fullName !== "You" && fullName.split(" ").length > 1) lastName = fullName.split(" ")[fullName.split(" ").length - 1]; - // try { - // const newProfile = await fetch(url_preset + "/klaviyo/identity", { - // method: "POST", - // headers: { - // "content-type": "application/json", - // }, - // body: JSON.stringify({ email, firstName, lastName }), - // }).then((res) => res.json()); - // const addedToList = await fetch(url_preset + "/klaviyo/list", { - // method: "POST", - // headers: { - // "content-type": "application/json", - // }, - // body: JSON.stringify({ email }), - // }).then((res) => res.json()); - // console.log(newProfile); - // console.log(addedToList); - // } catch (error) { - // console.error(error); - // } - } } if (apiQues.id == 20 && apiQues.type == 7) { if (Array.isArray(lastAnswerObject.answer)) { @@ -809,9 +776,6 @@ async function nextQuestion(goBack, goBackFromResponse, fromDependedOn) { $("#page4 .customImgRow .imgRowInner p").append(`${responseHeader}`); responseOnGoing = true; hasNoResponse = false; - // closeResponseTimeout = setTimeout(async () => { - // closeResponse(); - // }, closeResponseTimeoutCounter); } } else if (apiQues.answers && apiQues.answers[0].responseBody) { $("#page3").css("display", "none"); @@ -1001,7 +965,6 @@ async function askQuestion(totalQuizQuestions, counter, fromBack) { }); } // displaying note if it exists - if (note) { $("#noteRow").css("display", "flex"); $("#noteRow .noteDesc p").html(note);