Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
tafakkur committed Feb 20, 2021
1 parent 435c481 commit d9f8a8b
Showing 1 changed file with 26 additions and 27 deletions.
53 changes: 26 additions & 27 deletions JavaScript Files/all three.js
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
Qualtrics.SurveyEngine.addOnload(function(){
this.hideNextButton();
Qualtrics.SurveyEngine.setEmbeddedData("First", "Empathy");
var vidlen = 120;
var maxlen = vidlen*4;
time_off = 0;
var that = this;
document.addEventListener("fullscreenchange", function () {
Qualtrics.SurveyEngine.addOnload(function () {
this.hideNextButton();
Qualtrics.SurveyEngine.setEmbeddedData("First", "Empathy");

var vidlen = 120;
var maxlen = vidlen * 4;
time_off = 0;
var that = this;

document.addEventListener("fullscreenchange", function () {
if (document.fullscreenElement != null) {
Qualtrics.SurveyEngine.setEmbeddedData("full_screen", "TRUE");
}
});
Qualtrics.SurveyEngine.setEmbeddedData("full_screen", "TRUE");
}
});

document.addEventListener("visibilitychange", function () {
document.addEventListener("visibilitychange", function () {
if (document.visibilityState != "visible") {
Qualtrics.SurveyEngine.setEmbeddedData("tab_changed", "TRUE");
off_screen = setInterval(() => {
time_off++;
Qualtrics.SurveyEngine.setEmbeddedData("time_off", time_off);
time_off++;
Qualtrics.SurveyEngine.setEmbeddedData("time_off", time_off);
}, 100);
}else{
clearInterval(off_screen);
} else {
clearInterval(off_screen);
}
});

(function(){that.showNextButton();}).delay(vidlen);
(function(){
Qualtrics.SurveyEngine.setEmbeddedData("too_much_time", "TRUE");
that.clickNextButton();
}).delay(maxlen);



});
(function () {
that.showNextButton();
}.delay(vidlen));
(function () {
Qualtrics.SurveyEngine.setEmbeddedData("too_much_time", "TRUE");
that.clickNextButton();
}.delay(maxlen));
});

0 comments on commit d9f8a8b

Please sign in to comment.