diff --git a/apps/cory/index.json b/apps/cory/index.json index f922c445..339e6577 100644 --- a/apps/cory/index.json +++ b/apps/cory/index.json @@ -1 +1 @@ -{"type":"tildefriends-app","files":{"app.js":"&OOcUHSIAA6CR2dYSv2BwOMBZ1hjFg+PJZPABhZMe1Gc=.sha256","index.html":"&H2L4kR9xDS6oS7EDpesDCDB3JXDjcLTBg9XoR2mZaZw=.sha256","vue-material.js":"&K5cdLqXYCENPak/TCINHQhyJhpS4G9DlZHGwoh/LF2g=.sha256","tf-user.js":"&DdJwZYEo7AqFyutYMvEjykoVXxdHVog0UXye6Sbo0TU=.sha256","tf-message.js":"&3dPiSNYjoJE3zn1oTT1SBhbvkW9MHr7ZUDxUJiBI1Ss=.sha256","tf.js":"&RAwMitnSkY+F3lDbyXAvWYT1QOX0lUsNZC+JE7KW4JM=.sha256","commonmark.min.js":"&EP0OeR9zyLwZannz+0ga4s9AGES2RLvvIIQYHqqV6+k=.sha256","vue.js":"&g1wvA+yHl1sVC+eufTsg9If7ZeVyMTBU+h0tks7ZNzE=.sha256","vue-material-theme-default-dark.css":"&RP2nr+2CR18BpHHw5ST9a5GJUCOG9n0G2kuGkcQioWE=.sha256","vue-material.min.css":"&kGbUM2QgFSyHZRzqQb0b+0S3EVIlZ0AXpdiAVjIhou8=.sha256","roboto.css":"&jJv43Om673mQO5JK0jj7714s5E+5Yrf82H6LcDx7wUs=.sha256","material-icons.css":"&a28PdcVvgq/DxyIvJAx/e+ZOEtOuHnr3kjLWKyzH11M=.sha256","tf-shared.js":"&+qPP3g4CAUlkt8K4iBCZ+F5Fy6N7fu6MggvSVss2juE=.sha256"}} \ No newline at end of file +{"type":"tildefriends-app","files":{"app.js":"&OOcUHSIAA6CR2dYSv2BwOMBZ1hjFg+PJZPABhZMe1Gc=.sha256","index.html":"&vAy6mHSTMNDHo2P9CuRbsi0FMRtbOXXOP/2JbfGiZMU=.sha256","vue-material.js":"&K5cdLqXYCENPak/TCINHQhyJhpS4G9DlZHGwoh/LF2g=.sha256","tf-user.js":"&DdJwZYEo7AqFyutYMvEjykoVXxdHVog0UXye6Sbo0TU=.sha256","tf-message.js":"&3dPiSNYjoJE3zn1oTT1SBhbvkW9MHr7ZUDxUJiBI1Ss=.sha256","tf.js":"&/yKh5E/PLaK/M3tivdldiEDnpeYQYyuLHWjjdM/QpxE=.sha256","commonmark.min.js":"&EP0OeR9zyLwZannz+0ga4s9AGES2RLvvIIQYHqqV6+k=.sha256","vue.js":"&g1wvA+yHl1sVC+eufTsg9If7ZeVyMTBU+h0tks7ZNzE=.sha256","vue-material-theme-default-dark.css":"&RP2nr+2CR18BpHHw5ST9a5GJUCOG9n0G2kuGkcQioWE=.sha256","vue-material.min.css":"&kGbUM2QgFSyHZRzqQb0b+0S3EVIlZ0AXpdiAVjIhou8=.sha256","roboto.css":"&jJv43Om673mQO5JK0jj7714s5E+5Yrf82H6LcDx7wUs=.sha256","material-icons.css":"&a28PdcVvgq/DxyIvJAx/e+ZOEtOuHnr3kjLWKyzH11M=.sha256","tf-shared.js":"&+qPP3g4CAUlkt8K4iBCZ+F5Fy6N7fu6MggvSVss2juE=.sha256"}} \ No newline at end of file diff --git a/apps/cory/index/index.html b/apps/cory/index/index.html index 4f5b0b00..83d6ba3f 100644 --- a/apps/cory/index/index.html +++ b/apps/cory/index/index.html @@ -65,10 +65,15 @@
- + + + + + +
diff --git a/apps/cory/index/tf.js b/apps/cory/index/tf.js index d7ec7f27..5ba1851c 100644 --- a/apps/cory/index/tf.js +++ b/apps/cory/index/tf.js @@ -243,7 +243,6 @@ window.addEventListener('load', function() { input.onchange = function(event) { var file = event.target.files[0]; file.arrayBuffer().then(function(buffer) { - console.log(buffer); window.parent.postMessage({action: 'storeBlob', blob: { name: file.name, @@ -257,6 +256,26 @@ window.addEventListener('load', function() { }; input.click(); }, + paste(event) { + var items = (event.clipboardData || event.originalEvent.clipboardData).items; + for (let item of items) { + var file = item.getAsFile(); + if (file) { + file.arrayBuffer().then(function(buffer) { + window.parent.postMessage({ + action: 'storeBlob', + blob: { + name: file.name, + type: file.type, + buffer: buffer, + }, + }, '*'); + }); + event.preventDefault(); + break; + } + } + } } }); window.parent.postMessage('ready', '*');