diff options
| author | Jules Laplace <jules@okfoc.us> | 2014-11-22 23:19:36 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2014-11-22 23:19:36 -0500 |
| commit | 070b5e6d9d3c7e23c06f0ae0b75026923529c24d (patch) | |
| tree | 89c430dd17ca54ff60f885ecd99cf6cfa0f0b7ff /js/asdf.js | |
| parent | 04537ed34d443d0610b77420d1dbef64bc05fbfa (diff) | |
| parent | 1631cdf643283fc71bc9d70b5dcbce03ab9c2386 (diff) | |
Merge branch 'master' of lmno:dither
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){ |
