mario 3 years ago |
<input style="display:none" type="file" id="f" accept="image/*">
<script src="/api-imgur"></script>
<script>
document.querySelector("#upload").onclick = function() { document.querySelector("#f").click();} imgur("#f",{loading : function(load) {document.querySelector("#upload").innerHTML = '[ <i class="fa fa-upload" aria-hidden="true"></i> Upload pictures '+load+' ]'}, loaded : function(link,size,type,time) { var input = $("textarea#comment-comment").val(); $("textarea#comment-comment").val(input+" "); $("#upload").html('[ <i class="fa fa-upload" aria-hidden="true"></i> ]');}})
</script>
comment |