From a8da0298f74864cd69fcff95cc23f8ed66fa1a8d Mon Sep 17 00:00:00 2001 From: Matchu Date: Tue, 8 Jun 2010 18:55:13 -0400 Subject: [PATCH] fix console detection, move preview enable outside of pet set as current --- public/javascripts/items/show.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/javascripts/items/show.js b/public/javascripts/items/show.js index af1961bc..3db8703b 100644 --- a/public/javascripts/items/show.js +++ b/public/javascripts/items/show.js @@ -4,7 +4,7 @@ var PREVIEW_SWF_ID = 'item-preview-swf', speciesList = $('#item-preview a'), MainWardrobe; -if(console === undefined || console.log === undefined) { +if(typeof console == 'undefined' || typeof console.log == 'undefined') { function log() {} } else { log = $.proxy(console, 'log'); @@ -74,7 +74,6 @@ function PetType() { speciesList.filter('.current').removeClass('current'); this.link.addClass('current'); if(this.activated) { - Preview.enable(); this.load(); } else { showDeactivationMsg(); @@ -248,6 +247,8 @@ speciesList.each(function () { }); }); +Preview.enable(); + setTimeout($.proxy(Item.current, 'loadAllStandard'), 5000); MainWardrobe = { View: { Outfit: Preview } };