From 4100cf8af9a638a38c4e42cd7d9f3c0da7af3782 Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Sat, 9 Nov 2013 21:21:44 -0800 Subject: Enforcing the viewing order of videos. Also made the Outline links more noticeable. --- web/scripts/growth.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'web/scripts/growth.js') 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; -- cgit v1.2.3