Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
Shotgunosine authored Feb 23, 2024
1 parent b12ae29 commit 0703c32
Showing 1 changed file with 35 additions and 2 deletions.
37 changes: 35 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ <h4>Link&nbsp;to Task:<br />
<center>&nbsp;</center>

<center><em>Clicking the link&nbsp;below will open the task in a new tab.<br />
<strong>Please&nbsp;click the&nbsp;link only once and do not close the tab until you finish and see a message saying&nbsp;</strong></em><strong><em>&quot;Thank you for your patience.&quot;</em></strong><br />
<strong>You will be automatically redirected from the task to the survey once you have completed the task. Once you complete the survey, you will be redirected back to Prolific.</strong></center>
<strong>Please&nbsp;click the&nbsp;link only once and do not close the tab until you finish both the task and the survey and are redirected back to Prolific.<br />
<strong>You will be automatically redirected from the task to the survey once you have completed the task. Once you complete the survey, you will be redirected back to Prolific. </strong></center>
<center><em style="color: rgb(255, 0, 0);">If you have technical issues, please try a different browser! Some participants say&nbsp;<strong>Firefox</strong>&nbsp;has worked best.</em></center>
</center>
&nbsp;
Expand All @@ -81,7 +81,25 @@ <h4>Link&nbsp;to Task:<br />
</tr>
</tbody>
</table>
</div>

<center><button onclick="noSurveyFunction()">I WAS NOT REDIRECTED TO THE SURVEY</button></center>
<div id="SurveyLink" style="display:none;">
<div class="col-xs-12 col-md-6 col-md-offset-3" style="width: 485px; margin-left: 242.5px;">
<table class="table table-condensed table-bordered" style="width: 455px;">
<colgroup>
<col class="col-xs-4 col-md-4" style="width: 0px;" />
<col class="col-xs-8 col-md-8" style="width: 0px;" />
</colgroup>
<tbody>
<tr>
<td style="line-height: 1.42857;"><b><b><label>Task link:</label></b></b></td>
<td style="line-height: 1.42857;">
<p><b><b><a href="https://run.pavlovia.org/NIMH-COMPPSYCH/mood-expectation-hope-survey-prolific/?participant=" id="pavlovia-link" target="_blank">Click Here</a></b></b></p>
</td>
</tr>
</tbody>
</table>
</div>
<!-- End Survey Link Layout --></div>
</div>
Expand Down Expand Up @@ -140,6 +158,18 @@ <h4>Link&nbsp;to Task:<br />
var linkURL = $(linkElem).attr('href');
$(linkElem).attr('href', linkURL + phash);
}
}
function appendIDsToSuveyURL(linkElem, workerIDName) {
var url = window.location.href;
var workerName = 'workerId';
var workerRegex = new RegExp("[?&]" + workerName + "(=([^&#]*)|&|#|$)");
var workerResults = workerRegex.exec(url);
if (workerResults && workerResults[2]) {
var workerID = decodeURIComponent(workerResults[2].replace(/\+/g, " "));
var phash = cyrb53(workerResults[2]);
var linkURL = $(linkElem).attr('href');
$(linkElem).attr('href', linkURL + phash + '&bonuscode=zzzzz');
}
}
$(document).ready(function() {
// Instructions expand/collapse
Expand Down Expand Up @@ -168,6 +198,9 @@ <h4>Link&nbsp;to Task:<br />
document.getElementById('Links').style.display = "none";
document.getElementById('Goodbye').style.display = "block";
}
function noSurveyFunction() {
document.getElementById('SurveyLink').style.display = "block";
}
</script><!-- Close internal javascript -->
</body>
</html>

0 comments on commit 0703c32

Please sign in to comment.