Spaces:
Paused
Paused
Update chat_application/templates/room.html
Browse files61 unmodified lines6263646566676848 unmodified lines11711811912012112280 unmodified lines20320420520620720820915 unmodified lines22522622722822923061 unmodified lines<p>By clicking yes, you will exit the experiment <strong>without</strong> completing the final survey.</p><p>We encourage you to message us about any concerns or to <a href="{{ feedback_form_url | default('https://umw.qualtrics.com/jfe/form/SV_08v26NssCOwZTP8') }}" target="_blank">provide feedback here</a>.</p><div class="modal-buttons"><button class="modal-btn" id="abortYesBtn">Yes</button><button class="modal-btn" id="abortNoBtn">Cancel</button></div></div>48 unmodified lines};// Creates the post-survey link (based on the bot names)const endpoint = "{{ url_for('post_survey') }}";socketio.on("message", function (message) { createChatItem(message.message, message.sender) });function createChatItem(message, sender) {//autoscroll capabilities80 unmodified linesdocument.getElementById("abortNoBtn-pre").onclick = function () {modal.style.display = "none";};document.getElementById("abortYesBtn").onclick = function (e) {//block browser confirmation popupe.stopPropagation();// Mark that user aborted and redirect to ending survey15 unmodified linesdocument.getElementById("abortNoBtn").onclick = function () {abortModalConfirm.style.display = "none";};// add auto scrollfunction isNearBottom(container, threshold = 120) {61 unmodified lines626364656667686948 unmodified lines11811912012112212312480 unmodified lines20520620720820921021121221315 unmodified lines22923023123223323423523623723823924024124224324424524624724824925025125225325425525625761 unmodified lines<p>By clicking yes, you will exit the experiment <strong>without</strong> completing the final survey.</p><p>We encourage you to message us about any concerns or to <a href="{{ feedback_form_url | default('https://umw.qualtrics.com/jfe/form/SV_08v26NssCOwZTP8') }}" target="_blank">provide feedback here</a>.</p><div class="modal-buttons"><button class="modal-btn" id="abortYesBtn">End early with code "C9V2XFDU"</button><button class="modal-btn" id="abortYesBtn-SurveyAnyway">Flag my data and take the survey anyway.</button><button class="modal-btn" id="abortNoBtn">Cancel</button></div></div>48 unmodified lines};// Creates the post-survey link (based on the bot names)const endpoint = "{{ url_for('post_survey') }}";const endpointQuitEarly = "https://app.prolific.com/submissions/complete?cc=C9V2XFDU";socketio.on("message", function (message) { createChatItem(message.message, message.sender) });function createChatItem(message, sender) {//autoscroll capabilities80 unmodified linesdocument.getElementById("abortNoBtn-pre").onclick = function () {modal.style.display = "none";};document.getElementById("abortYesBtn-SurveyAnyway").onclick = function (e) {//block browser confirmation popupe.stopPropagation();// Mark that user aborted and redirect to ending survey15 unmodified linesdocument.getElementById("abortNoBtn").onclick = function () {abortModalConfirm.style.display = "none";};document.getElementById("abortYesBtn").onclick = function (e) {//block browser confirmation popupe.stopPropagation();// Mark that user aborted and redirect to ending surveyfetch("/abort", { method: "POST" }).then(() => {window.open(endpointQuitEarly, "_blank");});modal.style.display = "none";textarea.disabled = true;textarea.placeholder = "The chat has ended.";document.getElementById("send-btn").disabled = true;document.getElementById("end-exp-btn").disabled = true;document.getElementById("abort-exp-btn").disabled = true;if (socketio) {socketio.close();}abortModalConfirm.style.display = "none";};document.getElementById("abortNoBtn").onclick = function () {abortModalConfirm.style.display = "none";};// add auto scrollfunction isNearBottom(container, threshold = 120) {
chat_application/templates/room.html+29-2