-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathall three.js
35 lines (31 loc) · 940 Bytes
/
all three.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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 () {
if (document.fullscreenElement != null) {
Qualtrics.SurveyEngine.setEmbeddedData("full_screen", "TRUE");
}
});
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);
}, 100);
} else {
clearInterval(off_screen);
}
});
(function () {
that.showNextButton();
}.delay(vidlen));
(function () {
Qualtrics.SurveyEngine.setEmbeddedData("too_much_time", "TRUE");
that.clickNextButton();
}.delay(maxlen));
});