2 Commits

Author SHA1 Message Date
  Matt Baer 2dfddb1eb5 Bump version to 1.0.1 3 years ago
  Matt Baer feb27007eb Use URL property from upload response 3 years ago
2 changed files with 3 additions and 9 deletions
Split View
  1. +1
    -1
      manifest.json
  2. +2
    -8
      uploader.js

+ 1
- 1
manifest.json View File

@@ -4,7 +4,7 @@
"name": "Snap.as",
"short_name": "Snap.as",
"description": "Quickly upload your photos.",
"version": "1.0",
"version": "1.0.1",

"icons": {
"16": "icon16.png",


+ 2
- 8
uploader.js View File

@@ -41,14 +41,8 @@ Dropzone.options.uploader = {
dictDefaultMessage: 'Drop a file here',
init: function() {
this.on("success", function(file, resp) {
var fp = file.name.split(/\./);
var ext = '';
if (fp.length > 0) {
ext = '.' + fp[fp.length - 1];
}
var env = JSON.parse(resp);
var url = 'https://i.snap.as/' + env.data + ext;
copyToClipboard('![](' + url + ')');
var data = resp;
copyToClipboard('![](' + data.data.url + ')');
chrome.runtime.sendMessage({success: true}, function(response) { });
window.close();
});


Loading…
Cancel
Save