dirty hack til i sort the thing thing out

This commit is contained in:
reality 2013-04-16 18:06:03 +00:00
parent dcf03287f8
commit 52e6561f51
2 changed files with 8 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{ {
"webHost": "localhost", "webHost": "nourishedcloud.com",
"webPort": 8080, "webPort": 9001,
"externalPath": false, "externalPath": false,
"help": "https://github.com/reality/depressionbot/blob/master/modules/web/README.md" "help": "https://github.com/reality/depressionbot/blob/master/modules/web/README.md"
} }

View File

@ -9,12 +9,17 @@ html(lang='en')
var count = 0; var count = 0;
function getNewImage() { function getNewImage() {
count += 1; count += 1;
$('#loading').show();
$('#loading').text('Loading image ' + count + '...'); $('#loading').text('Loading image ' + count + '...');
$('#image').load(function(){}); $('#image').load(function(){});
$.get("/api/imgur/getRandomImage", function(d) { $.get("/api/imgur/getRandomImage", function(d) {
$('#image').attr('src', d.data[0]); $('#image').attr('src', d.data[0]);
$.get("/api/imgur/getImageInfoString", { 'slug': d.data[1] }, function(info) { $.get("/api/imgur/getImageInfoString", { 'slug': d.data[1] }, function(info) {
if(info.data[0].indexOf('undefined') == -1) {
$("#loading").text(count + ': ' + info.data[0]); $("#loading").text(count + ': ' + info.data[0]);
} else {
$("#loading").hide();
}
}, "json"); }, "json");
}, "json"); }, "json");
} }