X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Fjs%2Fdropzone-factory.js;h=ca77bb6d500652fcfbb4fbe3d4b36164bdc39555;hb=448c0b5bc94a413f755a79eeac921b1bb0841dfd;hp=1b2a2933744ff67ae93a13a4afb10a813d339bc0;hpb=57a7a3d6d803d0df59d17241e2d0bcce96abf275;p=friendica.git diff --git a/view/js/dropzone-factory.js b/view/js/dropzone-factory.js index 1b2a293374..ca77bb6d50 100644 --- a/view/js/dropzone-factory.js +++ b/view/js/dropzone-factory.js @@ -4,7 +4,6 @@ var DzFactory = function () { paramName: 'userfile', // The name that will be used to transfer the file maxFilesize: max_imagesize, // MB url: '/media/photo/upload?album=', - addRemoveLinks: true, acceptedFiles: 'image/*', clickable: true, accept: function(file, done) { @@ -13,13 +12,12 @@ var DzFactory = function () { init: function() { this.on('success', function(file, serverResponse) { const targetTextarea = document.getElementById(textareaElementId); - const bbcodeString = serverResponse; if (targetTextarea.setRangeText) { //if setRangeText function is supported by current browser - targetTextarea.setRangeText(' ' + $.trim(bbcodeString) + ' '); + targetTextarea.setRangeText(' ' + $.trim(serverResponse) + ' '); } else { targetTextarea.focus(); - document.execCommand('insertText', false /*no UI*/, '\n' + $.trim(bbcodeString) + '\n'); + document.execCommand('insertText', false /*no UI*/, '\n' + $.trim(serverResponse) + '\n'); } }); this.on('complete', function(file) {