aboutsummaryrefslogtreecommitdiffstats
path: root/lib/clipboard.js
diff options
context:
space:
mode:
authorPhil Crosby2012-06-10 23:38:35 -0700
committerPhil Crosby2012-06-12 22:00:34 -0700
commite8468e12f867cb71eb0d2b50c4904a1236b50e47 (patch)
treec1002de1e819fec28306eff1e5f7375fdc013047 /lib/clipboard.js
parentc7ce35423e3871dc121830f38de9cd79aebd704a (diff)
downloadvimium-e8468e12f867cb71eb0d2b50c4904a1236b50e47.tar.bz2
port clipboard.js to coffeescript
Diffstat (limited to 'lib/clipboard.js')
-rw-r--r--lib/clipboard.js29
1 files changed, 0 insertions, 29 deletions
diff --git a/lib/clipboard.js b/lib/clipboard.js
deleted file mode 100644
index b6d3940e..00000000
--- a/lib/clipboard.js
+++ /dev/null
@@ -1,29 +0,0 @@
-var Clipboard = {
- _createTextArea: function() {
- var textArea = document.createElement("textarea");
- textArea.style.position = "absolute";
- textArea.style.left = "-100%";
- return textArea;
- },
-
- // http://groups.google.com/group/chromium-extensions/browse_thread/thread/49027e7f3b04f68/f6ab2457dee5bf55
- copy: function(data) {
- var textArea = this._createTextArea();
- textArea.value = data;
-
- document.body.appendChild(textArea);
- textArea.select();
- document.execCommand("Copy");
- document.body.removeChild(textArea);
- },
-
- paste: function() {
- var textArea = this._createTextArea();
- document.body.appendChild(textArea);
- textArea.focus();
- document.execCommand("Paste");
- var rv = textArea.value;
- document.body.removeChild(textArea);
- return rv;
- }
-};