Update javascript dev dependencies

This commit is contained in:
Frederic Guillot
2017-01-02 20:47:20 -05:00
parent 3833c12ccc
commit f2a24fb3bf
9 changed files with 2431 additions and 19 deletions

View File

@@ -2,6 +2,10 @@ KB.component('screenshot', function (containerElement) {
var pasteCatcher = null;
var inputElement = null;
function onFileLoaded(e) {
createImage(e.target.result);
}
function onPaste(e) {
// Firefox doesn't have the property e.clipboardData.items (only Chrome)
if (e.clipboardData && e.clipboardData.items) {
@@ -16,10 +20,7 @@ KB.component('screenshot', function (containerElement) {
// Get the image as base64 data
var reader = new FileReader();
reader.onload = function (event) {
createImage(event.target.result);
};
reader.onload = onFileLoaded;
reader.readAsDataURL(blob);
}
}