{"_id":"clipboard-dom","_rev":"43-a48019ac4a0018ea7e4a37423ba3a178","name":"clipboard-dom","description":"Copy-to-Clipboard on a DOM element","dist-tags":{"latest":"0.0.6"},"versions":{"0.0.2":{"name":"clipboard-dom","description":"Copy-to-Clipboard on a DOM element","keywords":["copy","clipboard","text","click","dom","button"],"version":"0.0.2","dependencies":{"classes-component":"*","inherit-component":"*","emitter-component":"*","send":"*"},"component":{"files":["ZeroClipboard.swf"],"scripts":{"clipboard-dom":"clipboard-dom.js"}},"_id":"clipboard-dom@0.0.2","dist":{"shasum":"eed0c33522e5773d44a5d6e725f280a994fe3ed7","tarball":"https://registry.npmjs.org/clipboard-dom/-/clipboard-dom-0.0.2.tgz","integrity":"sha512-PckEdI00jS/HdJ1/RYusPiYoD4STJ3WRYQ8gaulWGS53H54lSQSSFb7PfS0zbCEhxaUfds++ndGzW+e0dRiUSw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH1M5IHGuUf412yt8s9dPRYWnA3CV0QTWkryFxIPs4TCAiEAk9Htsm8b92nsfwg/75xNPlWLqVFCEYodS6ZePafCMSs="}]},"_npmVersion":"1.1.59","_npmUser":{"name":"rauchg","email":"rauchg@gmail.com"},"maintainers":[{"name":"rauchg","email":"rauchg@gmail.com"}]},"0.0.3":{"name":"clipboard-dom","description":"Copy-to-Clipboard on a DOM element","keywords":["copy","clipboard","text","click","dom","button"],"version":"0.0.3","dependencies":{"classes-component":"*","inherit-component":"*","emitter-component":"*","send":"*"},"component":{"files":["ZeroClipboard.swf"],"scripts":{"clipboard-dom":"clipboard-dom.js"}},"_id":"clipboard-dom@0.0.3","dist":{"shasum":"d9468a51937772c2a782c50735cbf4800f2c7c18","tarball":"https://registry.npmjs.org/clipboard-dom/-/clipboard-dom-0.0.3.tgz","integrity":"sha512-enUiNdW0Vmq2kdgCIcs87gIGXcTpN/RW6ogODpHezBI3A+MMlccrwXKaG2ixtrGAbO9mgyOIefoI0FvpDonxBg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICLZk/oAjewqY/qK2rjRJAESTymktI85QSGISHAKUPWNAiAJpQwuI3ZrnEF+wWRXirFEyBiLv1iIDGNIM8/EGj87zw=="}]},"_npmVersion":"1.1.57","_npmUser":{"name":"tootallnate","email":"nathan@tootallnate.net"},"maintainers":[{"name":"rauchg","email":"rauchg@gmail.com"},{"name":"tootallnate","email":"nathan@tootallnate.net"}]},"0.0.4":{"name":"clipboard-dom","description":"Copy-to-Clipboard on a DOM element","keywords":["copy","clipboard","text","click","dom","button"],"version":"0.0.4","dependencies":{"classes-component":"*","inherit-component":"*","emitter-component":"*"},"component":{"files":["ZeroClipboard.swf"],"scripts":{"clipboard-dom":"index.js"}},"_id":"clipboard-dom@0.0.4","dist":{"shasum":"01e0f739734906dfac9e00359d58ff6ab8ebd0e1","tarball":"https://registry.npmjs.org/clipboard-dom/-/clipboard-dom-0.0.4.tgz","integrity":"sha512-k8+Hi+EGs+GDIadJg+l6sk0ase+EVoFxcJMEizr04ScTzl/syOqKwTF79QGLA54CI2zRSFc35X7pmQ4yg2mCHA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHoChTghv/CaKSkj7zTdF4NSIg1aVNacbPbQmoTSxaDUAiAwzpq/5PEp9qTnRfGIvbmw9JXPb0jaBAyRCRaMrt+G0w=="}]},"_from":".","_npmVersion":"1.3.5","_npmUser":{"name":"tootallnate","email":"nathan@tootallnate.net"},"maintainers":[{"name":"rauchg","email":"rauchg@gmail.com"},{"name":"tootallnate","email":"nathan@tootallnate.net"}]},"0.0.5":{"name":"clipboard-dom","description":"Copy-to-Clipboard on a DOM element","keywords":["copy","clipboard","text","click","dom","button"],"version":"0.0.5","dependencies":{"classes-component":"*","inherit-component":"*","emitter-component":"*"},"component":{"files":["ZeroClipboard.swf"],"scripts":{"clipboard-dom":"index.js"}},"repository":{"type":"git","url":"https://github.com/component/clipboard-dom.git"},"gitHead":"2f946edd3db8b87f286cfb42f2ef3f1f290e43f6","bugs":{"url":"https://github.com/component/clipboard-dom/issues"},"homepage":"https://github.com/component/clipboard-dom","_id":"clipboard-dom@0.0.5","scripts":{},"_shasum":"6c47eb0b1117bb2c8ca35f9bab25a3362092af63","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"tootallnate","email":"nathan@tootallnate.net"},"maintainers":[{"name":"rauchg","email":"rauchg@gmail.com"},{"name":"tootallnate","email":"nathan@tootallnate.net"}],"dist":{"shasum":"6c47eb0b1117bb2c8ca35f9bab25a3362092af63","tarball":"https://registry.npmjs.org/clipboard-dom/-/clipboard-dom-0.0.5.tgz","integrity":"sha512-77HOwfG378g+ok1+Ex7mNET8YGLrL5+KaM6+sAsrQqOQC7anM6PCQWX+XUn/1CnzKHEcfzkf983q+0YApJLkLw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCF4YyNxlLnXnzf0jvhGqCxgnWTwUINzxJMvV+6fjQGagIgVbe0r3yCSxDdZ5a3bPR65dP6mWqD7BaBlI/kbTH23Dw="}]}},"0.0.6":{"name":"clipboard-dom","description":"Copy-to-Clipboard on a DOM element","keywords":["copy","clipboard","text","click","dom","button"],"version":"0.0.6","dependencies":{"classes-component":"*","inherit-component":"*","emitter-component":"*"},"browser":{"classes":"classes-component","inherit":"inherit-component","emitter":"emitter-component"},"component":{"files":["ZeroClipboard.swf"],"scripts":{"clipboard-dom":"index.js"}},"repository":{"type":"git","url":"https://github.com/component/clipboard-dom.git"},"gitHead":"3add8f883426c4d5f5740c55afc28c281477e6e0","bugs":{"url":"https://github.com/component/clipboard-dom/issues"},"homepage":"https://github.com/component/clipboard-dom","_id":"clipboard-dom@0.0.6","scripts":{},"_shasum":"5731f1edc8efb9d460b1fe591f798c6fec2ae6ec","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"tootallnate","email":"nathan@tootallnate.net"},"maintainers":[{"name":"rauchg","email":"rauchg@gmail.com"},{"name":"tootallnate","email":"nathan@tootallnate.net"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"},{"name":"retrofox","email":"rdsuarez@gmail.com"},{"name":"coreh","email":"thecoreh@gmail.com"},{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"kelonye","email":"kelonyemitchel@gmail.com"},{"name":"mattmueller","email":"mattmuelle@gmail.com"},{"name":"yields","email":"yields@icloud.com"},{"name":"anthonyshort","email":"antshort@gmail.com"},{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"ianstormtaylor","email":"ian@ianstormtaylor.com"},{"name":"cristiandouce","email":"cristian@gravityonmars.com"},{"name":"swatinem","email":"arpad.borsos@googlemail.com"},{"name":"stagas","email":"gstagas@gmail.com"},{"name":"amasad","email":"amjad.masad@gmail.com"},{"name":"juliangruber","email":"julian@juliangruber.com"},{"name":"shtylman","email":"shtylman@gmail.com"},{"name":"calvinfo","email":"calvin@calv.info"},{"name":"dominicbarnes","email":"dominic@dbarnes.info"},{"name":"clintwood","email":"clint@anotherway.co.za"},{"name":"thehydroimpulse","email":"dnfagnan@gmail.com"},{"name":"timoxley","email":"secoif@gmail.com"},{"name":"timaschew","email":"timaschew@gmail.com"},{"name":"hughsk","email":"hughskennedy@gmail.com"}],"dist":{"shasum":"5731f1edc8efb9d460b1fe591f798c6fec2ae6ec","tarball":"https://registry.npmjs.org/clipboard-dom/-/clipboard-dom-0.0.6.tgz","integrity":"sha512-+EduWgLYkUt+GInr+r210uG2dikbvUkAoqX7ZsMBMu/TK7EauIQfmtNbZKd1eBC0Q3TagIxL5VksYcttcnajXQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJ7SaNyIxMounYuTRTUtCEK1JDdTCD0DBdjINrd4xS8gIgPan9oIW3XX/FUqxT6VGOPjbJaBpHAs5jiA97t/9cnzo="}]}}},"readme":"\n# clipboard-dom\n\n  Makes a DOM element (i.e. &lt;button&gt;) write to the system clipboard. This\n  component is based off of the [ZeroClipboard](https://github.com/jonrohan/ZeroClipboard)\n  project, and in fact uses the same SWF Flash code.\n\n## Installation\n\n```\n$ component install component/clipboard-dom\n```\n\n## Example\n\n``` html\n<html>\n  <body>\n    <!-- The \"copy-button\" *should* be inside a div with \"position: relative\"\n         or something else that \"has layout\". -->\n    <div style=\"position: relative;\">\n      <button id=\"copy-button\">Copy to Clipboard</button>\n    </div>\n    <script src=\"build/build.js\"></script>\n    <script src=\"main.js\"></script>\n  </body>\n</html>\n```\n\n``` js\n// main.js\n\nvar Clip = require('clipboard-dom');\n\n// set the path to the swf file first\nClip.swf('/swf/ZeroClipboard.swf');\n\n// create a \"Clip\" instance\nvar ele = document.getElementById('copy-button');\nvar parent = ele.parentNode; // parent should \"have layout\"\nvar clip = new Clip(ele, parent);\n\n// listen for meaningful events\nclip.on('load', function(){\n  console.log('button loaded');\n});\n\nclip.on('complete', function(text){\n  console.log('copied text to the clipboard:', text);\n});\n\nclip.on('mousedown', function() {\n  // \"mousedown\" is the last chance to set the text before it gets copied\n  var input = document.getElementById('copy-text');\n  clip.text(input.value);\n});\n```\n\n## Events\n\n### \"load\"\n\nFired when the SWF movie for the clipboard instance has loaded.\n\n### \"complete\"\n\nFired when the user clicks on the button and the text has been copied.\nThe text that got copied is passed in as an argument.\n\n### \"mouseover\"\n\nFired when the user mouses over the button.\n\n### \"mouseout\"\n\nFired when the user mouses away from the button.\n\n### \"mousedown\"\n\nFired when the user pressed the mouse down on the button.\n\n### \"mouseup\"\n\nFired when the user releases the mouse from the button.\n","maintainers":[{"email":"shtylman@gmail.com","name":"defunctzombie"},{"email":"df.creative@gmail.com","name":"dfcreative"},{"email":"rauchg@gmail.com","name":"rauchg"},{"email":"nathan@tootallnate.net","name":"tootallnate"},{"email":"tj@vision-media.ca","name":"tjholowaychuk"},{"email":"rdsuarez@gmail.com","name":"retrofox"},{"email":"thecoreh@gmail.com","name":"coreh"},{"email":"forbes@lindesay.co.uk","name":"forbeslindesay"},{"email":"kelonyemitchel@gmail.com","name":"kelonye"},{"email":"mattmuelle@gmail.com","name":"mattmueller"},{"email":"yields@icloud.com","name":"yields"},{"email":"antshort@gmail.com","name":"anthonyshort"},{"email":"jonathanrichardong@gmail.com","name":"jongleberry"},{"email":"ian@ianstormtaylor.com","name":"ianstormtaylor"},{"email":"cristiandouce@gmail.com","name":"cristiandouce"},{"email":"arpad.borsos@googlemail.com","name":"swatinem"},{"email":"gstagas@gmail.com","name":"stagas"},{"email":"amjad.masad@gmail.com","name":"amasad"},{"email":"julian@juliangruber.com","name":"juliangruber"},{"email":"calvin@calv.info","name":"calvinfo"},{"email":"dominic@dbarnes.info","name":"dominicbarnes"},{"email":"clint@anotherway.co.za","name":"clintwood"},{"email":"dnfagnan@gmail.com","name":"thehydroimpulse"},{"email":"secoif@gmail.com","name":"timoxley"},{"email":"timaschew@gmail.com","name":"timaschew"},{"email":"hughskennedy@gmail.com","name":"hughsk"}],"time":{"modified":"2022-06-13T06:10:49.353Z","created":"2012-09-04T17:26:31.103Z","0.0.2":"2012-09-04T17:26:32.612Z","0.0.3":"2012-09-04T18:29:07.150Z","0.0.4":"2013-08-13T16:27:44.362Z","0.0.5":"2014-06-17T20:11:15.190Z","0.0.6":"2015-03-12T01:42:24.430Z"},"keywords":["copy","clipboard","text","click","dom","button"],"readmeFilename":"Readme.md","homepage":"https://github.com/component/clipboard-dom","repository":{"type":"git","url":"https://github.com/component/clipboard-dom.git"},"bugs":{"url":"https://github.com/component/clipboard-dom/issues"},"users":{"timhudson":true}}