From 0cdbe99c889b125e6f94653516000906ee19a022 Mon Sep 17 00:00:00 2001 From: Matchu Date: Thu, 5 Dec 2013 13:08:46 -0600 Subject: [PATCH] use yesterday's notables for spotlights, because I never update spotlight pets :P --- app/assets/javascripts/outfits/new.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/outfits/new.js b/app/assets/javascripts/outfits/new.js index 05cef1a8..209dcbf6 100644 --- a/app/assets/javascripts/outfits/new.js +++ b/app/assets/javascripts/outfits/new.js @@ -42,9 +42,10 @@ var Preview = { } } -$.get('/spotlight_pets.txt', function (data) { - var names = data.split('\n'), i = Math.floor(Math.random()*(names.length-1)); - Preview.Job.fallback = new Preview.Job.Name(names[i]); +$.getJSON('http://notables.openneo.net/api/1/days/ago/1?callback=?', function (response) { + var notables = response.notables; + var i = Math.floor(Math.random() * notables.length); + Preview.Job.fallback = new Preview.Job.Name(notables[i].petName); if(!Preview.Job.current) { Preview.Job.fallback.setAsCurrent(); }