Last active
August 4, 2023 20:56
-
-
Save FatalMerlin/81855bf133773bb7be2a57084dd7e5ec to your computer and use it in GitHub Desktop.
SoSciSurvey - Hide submit button until first audio on page played
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
SoSciTools.submitButtonsHide(); | |
SoSciTools.attachEvent(window, 'load', function () { | |
let audio = document.getElementsByTagName('audio')[0]; | |
audio.onended = () => { | |
window.setTimeout(SoSciTools.submitButtonsDisplay, 1000); | |
}; | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment