Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 4th, 2011  |  syntax: JavaScript  |  size: 0.51 KB  |  hits: 199  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. var delPhoto = function() {
  2.   var getCurrentId = function() { for(var i in _ZGLOBAL) { if(_ZGLOBAL.hasOwnProperty(i) && !isNaN(i)) { return i; } } }
  3.   var next = _ZGLOBAL.seekr.next_key; var prev = _ZGLOBAL.seekr.prev_key;
  4.   var go = function(id) { window.location = photos_url +id+'/'; }
  5.   var del = function(id) { ZAPI.callMethodJSON( 'zooomr.photos.delete', {photo_id : id }, { onSuccess : s }); }
  6.   var s = function( t ) { if (next > 0) { go(next) } else { go(prev) } }
  7.   del(getCurrentId());
  8. }
  9.  
  10. delPhoto();