Created
June 11, 2016 05:46
-
-
Save LusciousPear/3190e66c8bfc1751a84a464017046e3e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>sb</title> | |
<script src="//code.jquery.com/jquery-2.1.4.min.js"></script> | |
<script src="js/clipboard/dist/clipboard.js"></script> | |
<script type="text/javascript">try { | |
Typekit.load(); | |
} catch (e) { | |
}</script> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/> | |
<script src="js/iws6ohy.js"></script> | |
<script src="js/core.js"></script> | |
<link rel="stylesheet" type="text/css" href="css/app.css"> | |
<script src="js/dropzone/dist/dropzone.js"></script> | |
<link rel="stylesheet" type="text/css" href="js/dropzone/dist/basic.css"> | |
<link rel="stylesheet" type="text/css" href="js/dropzone/dist/dropzone.css"> | |
<script> | |
function play() { | |
var audio = document.getElementById("audio"); | |
audio.play(); | |
} | |
</script> | |
<script> | |
Dropzone.autoDiscover = false; | |
Dropzone.options.dropzoneDiv = { | |
url: '/upload', | |
init: function () { | |
this.on("addedfile", function (file) { | |
play(); | |
}); | |
this.on("success", function(file, response) { | |
console.log(response); | |
var out = JSON.parse(response) | |
$("#imgtxt").text($.map(out[0], function(value,key) {return value;} ) ); | |
}) | |
} | |
}; | |
</script> | |
</head> | |
<body> | |
<section> | |
<div id="container"> | |
Drag your file or click upload box. | |
<audio id="audio" src="https://storage.googleapis.com/thephodrop-media/bloop.wav"></audio> | |
<div id="dropzoneDiv" class="dropzone dz-clickable" style="height:200px ; width:600px"> | |
<!--<form id="uploader" action="/upload" class="dropzone" style="height:400px ; width:600px">where is this</form>--> | |
</div> | |
<div id="imgdiv"><span id="imgtxt"></span></div> | |
<script> | |
$('#dropzoneDiv').dropzone(); | |
var clipboard = new Clipboard('#imgtxt'); | |
clipboard.on('success', function(e) { | |
console.info('Action:', e.action); | |
console.info('Text:', e.text); | |
console.info('Trigger:', e.trigger); | |
e.clearSelection(); | |
}); | |
</script> | |
</div> | |
</section> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment