diff options
Diffstat (limited to 'js/copy.js')
| -rw-r--r-- | js/copy.js | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/js/copy.js b/js/copy.js deleted file mode 100644 index d1ae716..0000000 --- a/js/copy.js +++ /dev/null @@ -1,22 +0,0 @@ -var clipboard = (function () { - - var disabled = false; - var contentType = 'text/plain;charset=utf-8' - document.body.addEventListener('copy', function (e) { - if (disabled) { return } - if (e.clipboardData) { - e.preventDefault(); - e.clipboardData.setData(contentType, canvas.ascii()); - } - if (window.clipboardData) { - e.returnValue = false; - window.clipboardData.setData(contentType, canvas.ascii()); - } - }, false); - - return { - enable: function(){ disabled = false } - disable: function(){ disabled = true } - } - -})()
\ No newline at end of file |
