Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

not much to say on this one

  • Loading branch information...
commit 24a858d620e6cf8971b67664b14a21a34e69daab 2 parents d615b0f + a982240
Adam Greene authored
View
2  app/views/links/show.rhtml
@@ -1,2 +1,2 @@
<iframe src="<%= @link.website_url %>" style="position: fixed; top:0; left:0; width: 100%; height: 100%" frameborder='0' marginheight='0' marginwidth='0' scrolling='auto' class='viewing'></iframe>
-<a href='/images/photos/image1.jpg' class='hide zombie'></a>
+<a href='/images/zombies/<%= ZOMBIE_IMAGES[rand(ZOMBIE_IMAGES.length)] %>' id='zombie' class='hide'></a>
View
5 config/environment.rb
@@ -43,7 +43,7 @@
# See Rails::Configuration for more options
- config.action_controller.session = { :session_key => "_rubyurl_session", :secret => "oy8j2c45ync4ny43n3cmtho3cht35y4t8hn7" }
+ config.action_controller.session = { :session_key => "_zombieurl_session", :secret => "oy8j2c45ync4ny43n3cmtho3cht35y4t8hn7" }
end
# Add new inflection rules using the following format
@@ -60,4 +60,5 @@
# Mime::Type.register "application/x-mobile", :mobile
# Include your application configuration below
-require 'hash_extensions'
+
+ZOMBIE_IMAGES = Dir.entries("#{RAILS_ROOT}/public/images/zombies").reject{|e| [".", ".."].include? e}
View
BIN  public/images/zombies/1.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  public/images/zombies/2.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
19 public/javascripts/application.js
@@ -1,14 +1,13 @@
var Zombie = {};
-Zombie.load_delayed_images = function(){
- $('a.zombie').each(function(i, a){
- img = $("<img src='" + $(a).attr('href') + "'></img>");
-alert('good?')
- //NOTE: usiing img.load(); doesn't work..... it throws an erro in jquery, though this does. odd
- img.trigger('load');
- });
-}
+// Zombie.load_delayed_images = function(){
+// $('a#zombie').each(function(i, a){
+// img = $("<img src='" + $(a).attr('href') + "'></img>");
+// //NOTE: usiing img.load(); doesn't work..... it throws an erro in jquery, though this does. odd
+// img.trigger('load');
+// });
+// }
$(function() {
- // Zombie.load_delayed_images();
- // $('a.zombie').lightBox().click();
+ Zombie.load_delayed_images();
+ $('a#zombie').lightBox().click();
});
Please sign in to comment.
Something went wrong with that request. Please try again.