diff options
Diffstat (limited to 'shader-gif.html')
| -rw-r--r-- | shader-gif.html | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/shader-gif.html b/shader-gif.html index 07cd156..1369225 100644 --- a/shader-gif.html +++ b/shader-gif.html @@ -25,6 +25,7 @@ div { display: inline-block; padding: 10px;} #instructions.dragging iframe { pointer-events: none; } #instructions .close { position: absolute; top: 5px; right: 5px; color: #f00; padding: 3px; border: 0;background: white; font-size: 10px; line-height: 10px; } .close,.remove { cursor: pointer; } +#uploaded-url { display: none; width: 300px; } </style> </head> <body> @@ -70,6 +71,7 @@ div { display: inline-block; padding: 10px;} <button id="save" disabled>save</button> <button id="upload" disabled>upload</button> <br> + <input type="text" id="uploaded-url"> </div> <div id="instructions"><iframe src="instructions.html"></iframe><button class="close">x</button></div> @@ -378,13 +380,20 @@ function upload(){ blob: blob, filename: filename + "-" + (+new Date()) + ".gif", username: "", - success: function(msg){ - console.log(msg); - status("upload successful: " + msg) + success: function(data){ + + // data.url + // data.filesize + // data.success + + console.log(data); + status("uploaded"); + + $("#uploaded-url").show().focus().val(data.url) }, - error: function(e){ - console.log(e) - status("error uploading: " + e) + error: function(data){ + console.log(data) + status("error uploading: " + data.error) } }); } |
