From d3e7b5708deffbed864c916de22663f48333c58b Mon Sep 17 00:00:00 2001 From: yo mama Date: Tue, 22 Sep 2015 00:51:40 -0700 Subject: finishing server --- share/frontend/js/photoblaster-0.1.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 share/frontend/js/photoblaster-0.1.js (limited to 'share/frontend/js/photoblaster-0.1.js') diff --git a/share/frontend/js/photoblaster-0.1.js b/share/frontend/js/photoblaster-0.1.js new file mode 100644 index 0000000..43fc785 --- /dev/null +++ b/share/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