From 52e6561f51efa7bce301df96da4c432fe7fe3c40 Mon Sep 17 00:00:00 2001 From: reality Date: Tue, 16 Apr 2013 18:06:03 +0000 Subject: [PATCH] dirty hack til i sort the thing thing out --- modules/web/config.json | 4 ++-- views/imgur/imgurr.jade | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/web/config.json b/modules/web/config.json index f714ecc..1b7646b 100644 --- a/modules/web/config.json +++ b/modules/web/config.json @@ -1,6 +1,6 @@ { - "webHost": "localhost", - "webPort": 8080, + "webHost": "nourishedcloud.com", + "webPort": 9001, "externalPath": false, "help": "https://github.com/reality/depressionbot/blob/master/modules/web/README.md" } diff --git a/views/imgur/imgurr.jade b/views/imgur/imgurr.jade index 1a1440b..3bcc1e8 100644 --- a/views/imgur/imgurr.jade +++ b/views/imgur/imgurr.jade @@ -9,12 +9,17 @@ html(lang='en') var count = 0; function getNewImage() { count += 1; + $('#loading').show(); $('#loading').text('Loading image ' + count + '...'); $('#image').load(function(){}); $.get("/api/imgur/getRandomImage", function(d) { $('#image').attr('src', d.data[0]); $.get("/api/imgur/getImageInfoString", { 'slug': d.data[1] }, function(info) { - $("#loading").text(count + ': ' + info.data[0]); + if(info.data[0].indexOf('undefined') == -1) { + $("#loading").text(count + ': ' + info.data[0]); + } else { + $("#loading").hide(); + } }, "json"); }, "json"); }