diff options
| author | pepper <peppersclothescult@gmail.com> | 2014-01-21 00:56:21 -0800 |
|---|---|---|
| committer | pepper <peppersclothescult@gmail.com> | 2014-01-21 00:56:21 -0800 |
| commit | 6671e52efea7bf4ee8e45c500166fbc8d865bbdb (patch) | |
| tree | edf17796610012a534e090c06ba7b83c9b4037d6 /cgi-bin/javascript_example.js | |
| parent | f850411f437d3eb9cb1d37456d0eab29a9358918 (diff) | |
| parent | 60a5e5581ccbf05170ccd6bab292562c460a42c2 (diff) | |
mergin again
Merge branch 'master' of ghghgh.us:/home/git/dither into pepper
Diffstat (limited to 'cgi-bin/javascript_example.js')
| -rw-r--r-- | cgi-bin/javascript_example.js | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/cgi-bin/javascript_example.js b/cgi-bin/javascript_example.js deleted file mode 100644 index 1e7e31f..0000000 --- a/cgi-bin/javascript_example.js +++ /dev/null @@ -1,39 +0,0 @@ -function save_shader(){ - typeof shader_id_root == 'undefined' ? shader_id_root = "" : shader_id_root - var params = { - script : $("#shader").val(), - image_url : $("#url").val(), - username : user.username, - shader_id : shader_id_root - } - console.log(params) - $.post("/cgi-bin/im/shader/save", params, function(resp){ - console.log(resp); - data = JSON.parse(resp) - if (data.ERROR ){ - alert(data.ERROR) - return false - } - if (! shader_id_root) { - shader_id_root = data.id; - } - - var blob = dataUriToBlob(cc.clone().resize(200,200).canvas.toDataURL("image/png")) - var form = new FormData(); - - form.append("id", data.id); - form.append("qqfile", blob); - $.ajax({ - url: "/cgi-bin/im/shader/thumbnail_upload", - type: "POST", - data: form, - processData: false, - contentType: false, - }).done(function(resp){ - console.log(resp); - }); - - }) - //maintain the shader_id_root... - return shader_id_root; -} |
