use yesterday's notables for spotlights, because I never update spotlight pets :P
This commit is contained in:
parent
5ba01b5672
commit
0cdbe99c88
1 changed files with 4 additions and 3 deletions
|
@ -42,9 +42,10 @@ var Preview = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$.get('/spotlight_pets.txt', function (data) {
|
$.getJSON('http://notables.openneo.net/api/1/days/ago/1?callback=?', function (response) {
|
||||||
var names = data.split('\n'), i = Math.floor(Math.random()*(names.length-1));
|
var notables = response.notables;
|
||||||
Preview.Job.fallback = new Preview.Job.Name(names[i]);
|
var i = Math.floor(Math.random() * notables.length);
|
||||||
|
Preview.Job.fallback = new Preview.Job.Name(notables[i].petName);
|
||||||
if(!Preview.Job.current) {
|
if(!Preview.Job.current) {
|
||||||
Preview.Job.fallback.setAsCurrent();
|
Preview.Job.fallback.setAsCurrent();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue