impress/public/assets/pet_query.js

1 line
445 B
JavaScript
Raw Normal View History

function petImage(e,t){return"http://pets.neopets.com/"+e+"/1/"+t+".png"}var PetQuery={},query_string=document.location.hash||document.location.search;$.each(query_string.substr(1).split("&"),function(){var e=this.split("=");e.length==2&&(PetQuery[e[0]]=e[1])}),PetQuery.name&&PetQuery.species&&PetQuery.color&&$("#pet-query-notice-template").tmpl({pet_name:PetQuery.name,pet_image_url:petImage("cpn/"+PetQuery.name,1)}).prependTo("#container");