diff options
Diffstat (limited to 'web/scripts/growth.js')
-rw-r--r-- | web/scripts/growth.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/web/scripts/growth.js b/web/scripts/growth.js index 5f5b273..fa5e3a9 100644 --- a/web/scripts/growth.js +++ b/web/scripts/growth.js @@ -143,6 +143,11 @@ function sendAnswer(required) function playVideo(videoId) { + if (!$('#' + videoId).hasClass('allowed')) { + notice("You must watch the videos in order."); + return; + } + $.ajax({ type: "GET", url: location.href + "/videos/" + videoId + ".json", @@ -197,6 +202,7 @@ function reportVideoComplete(data) var completedBefore = $('#videos article .completed').length; $('#' + data.id).addClass('completed'); + $('#' + data.id).parent().next().children('div.image').addClass('allowed'); var completed = $('#videos article .completed').length; var total = $('#videos article').length; |