diff options
Diffstat (limited to 'js/asdf.js')
| -rw-r--r-- | js/asdf.js | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,7 +1,7 @@ // // asdf .. asdf.us/im search api -var asdf = { fetching: false } +var asdf = { fetching: false, fetched: false } asdf.random = function (e){ status("fetching random photoblasts") e && e.preventDefault(); @@ -13,7 +13,7 @@ asdf.random = function (e){ asdf.fetch = function (opt){ if (asdf.fetching) return; - asdf.fetching = true; + asdf.fetching = true var params = {random:1}; $.ajax({ 'url': "http://asdf.us/cgi-bin/im/list", @@ -21,6 +21,7 @@ asdf.fetch = function (opt){ 'dataType': "jsonp", 'success': function(urls){ asdf.fetching = false; + asdf.fetched = true opt.success && opt.success(urls) }, 'error': opt.error || function(err){ |
