Skip to content

Commit

Permalink
removed console.log
Browse files Browse the repository at this point in the history
  • Loading branch information
judemont committed May 16, 2024
1 parent 5f83847 commit 231251c
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 12 deletions.
1 change: 0 additions & 1 deletion scripts/getComments.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ async function getComments(profId) {
}),
});
let responseJson = await response.json();
console.log(responseJson);
return responseJson;
}
1 change: 0 additions & 1 deletion scripts/loadTeachers.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ function addTeachers(teachers) {

let htmlResult = "";
teachers.forEach((teacher) => {
console.log(teacher);
htmlResult += /*html*/ `
<div class="standard-card">
<div class="standard-card-top">
Expand Down
26 changes: 18 additions & 8 deletions scripts/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,24 @@ function openCommentsPopup(popupId, profId) {
recreateNode(document.getElementById("commentPopup"), true);

const sendCommentButton = document.getElementById("sendCommentButton");
sendCommentButton.addEventListener("click", () => {
sendComment(
document.getElementById("commentContentInput").value,
profId
).then(() => {
getComments(profId).then(function (comments) {
loadComments(comments);
});
const sendCommentInput = document.getElementById("commentContentInput");
console.log(sendCommentInput.value);
sendCommentInput.addEventListener("input", function (e) {
alert(e.key);
if (e.key == "Enter") {
onCommentSend();
}
});
sendCommentButton.addEventListener("click", () => onCommentSend());
}

function onCommentSend() {
sendComment(
document.getElementById("commentContentInput").value,
profId
).then(() => {
getComments(profId).then(function (comments) {
loadComments(comments);
});
});
}
Expand Down
1 change: 0 additions & 1 deletion scripts/sendComment.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ async function sendComment(content, teacher_ID) {
}),
});
let responseJson = await response.json();
console.log(responseJson);
// if (responseJson.info == "vote updated") {
// alert("Votre vote a été mis a jour");
// }
Expand Down
1 change: 0 additions & 1 deletion scripts/sendRating.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ async function sendVotes(profId, teachingQuality, kindness, authority, humor) {
}),
});
let responseJson = await response.json();
console.log(responseJson);
if (responseJson.info == "vote updated") {
alert("Votre vote a été mis a jour");
}
Expand Down

0 comments on commit 231251c

Please sign in to comment.