@* This is the source code for an MTurk project, design layout. It's intended to be copy-pasted by a user to the 'source' field in MTurk. *@ @* We cannot use the script tag here because it's evaluated by the browser while loading *@ // Hint: What is called a study in JATOS is called a survey in MT var studyLink = "studyLinkDummy"; var query = document.URL.split("?")[1]; window.onload = function () { if ((typeof query === "undefined") || query.indexOf("ASSIGNMENT_ID_NOT_AVAILABLE") > -1) { // Show preview document.getElementById("previewHit").style.display = "block"; document.getElementById("acceptedHit").style.display = "none"; var studyUrlHref = ""; var studyUrlText = "link will be shown when HIT is accepted"; } else { // Show accepted HIT document.getElementById("previewHit").style.display = "none"; document.getElementById("acceptedHit").style.display = "block"; var studyUrlHref = studyLink + "?" + query; var studyUrlText = "link to HIT"; } document.getElementById("studyUrl").setAttribute("href", studyUrlHref); document.getElementById("studyUrl").innerHTML = studyUrlText; }