Skip to content

Commit

Permalink
make first video random too
Browse files Browse the repository at this point in the history
  • Loading branch information
Neeraj Singh committed May 23, 2011
1 parent 6404505 commit e52f77b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/initializers/videos.rb
Original file line number Diff line number Diff line change
@@ -1 +1 @@
YOUTUBE_IDS = ["QZYS8xoBYhM", "kBfdQYpF1NA", "Qy_bQSKysYw"]
YOUTUBE_IDS = ["QZYS8xoBYhM", "kBfdQYpF1NA", "Qy_bQSKysYw", "L_zRDchkDXg", "qla13aWrNP4", "RckfbOm84Qc"]
3 changes: 2 additions & 1 deletion public/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ jQuery(function($) {
$.getJSON('videos', function(data) {
videos = data.videos;

currentVideoId = videos[0];
//currentVideoId = videos[0];
currentVideoId = videos[Math.floor(Math.random() * videos.length)];

var params = {
allowScriptAccess: "always"
Expand Down

0 comments on commit e52f77b

Please sign in to comment.