diff options
| author | Julie Lala <jules@okfoc.us> | 2014-11-29 00:57:13 -0500 |
|---|---|---|
| committer | Julie Lala <jules@okfoc.us> | 2014-11-29 00:57:13 -0500 |
| commit | 05d359b6cdabc42025881e0a39c00995d8a29394 (patch) | |
| tree | be4884f4b7db0b0a57c8924092f0a8ea1197aba5 | |
| parent | ca7dddb1a0ad759d3c762fc323f3604ba939e8c1 (diff) | |
FIX CLIPBOARD
| -rw-r--r-- | fixedsys-excelsior.zip | bin | 0 -> 57272 bytes | |||
| -rw-r--r-- | js/clipboard.js | 22 |
2 files changed, 22 insertions, 0 deletions
diff --git a/fixedsys-excelsior.zip b/fixedsys-excelsior.zip Binary files differnew file mode 100644 index 0000000..367392a --- /dev/null +++ b/fixedsys-excelsior.zip diff --git a/js/clipboard.js b/js/clipboard.js new file mode 100644 index 0000000..744901c --- /dev/null +++ b/js/clipboard.js @@ -0,0 +1,22 @@ +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 |
