diff options
author | Jesse Morgan <jesse@jesterpm.net> | 2013-11-09 21:21:44 -0800 |
---|---|---|
committer | Jesse Morgan <jesse@jesterpm.net> | 2013-11-09 21:21:44 -0800 |
commit | 41eeace2b82271c8b5ea569ffe286a8a2f25216f (patch) | |
tree | 798e85491ac63454f4756a6fc292aaeed55602ff /web/scripts/growth.js | |
parent | 0d90da39f77ac3cfa607a68bc59336bf0bdff240 (diff) |
Enforcing the viewing order of videos.
Also made the Outline links more noticeable.
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; |