From 236fd1d9f2009083fbbfce7190c27fbf1d7c88b8 Mon Sep 17 00:00:00 2001 From: yo mama Date: Fri, 7 Aug 2015 18:33:30 -0700 Subject: getting ready --- frontend/js/photoblaster-0.1.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 frontend/js/photoblaster-0.1.js (limited to 'frontend/js/photoblaster-0.1.js') diff --git a/frontend/js/photoblaster-0.1.js b/frontend/js/photoblaster-0.1.js new file mode 100644 index 0000000..43fc785 --- /dev/null +++ b/frontend/js/photoblaster-0.1.js @@ -0,0 +1,22 @@ +(function($){ + $.photoblaster = function(url, name, success, error){ + if (! url) return; + var API_HEADER = "#@im", + success = success || function (data) {}, + error = error || function () {}, + params = { + 'url': url, + 'name': name || 'api', + 'transparent': true, + 'fuzz': 5, + }; + $.ajax({ + 'url': "http://asdf.us/cgi-bin/im/generate", + 'data': params, + 'dataType': "jsonp", + 'success': success, + 'error': error + }); + }; +})(jQuery); + -- cgit v1.2.3-70-g09d2